17 ms·
I ran the servers for our networks, binary exploitation, and intro systems programming classes, and this thing is a major annoyance. It is because of this stupi
by bkallus 2y ago
I ran the servers for our networks, binary exploitation, and intro systems programming classes, and this thing is a major annoyance. It is because of this stupid RAT that students do not understand how to use the OpenSSH client.
I've tried a few things to fix this:
1., I set a motd on our class servers asking the students not to use the VSCode remote server plugin.
2. I ran `ncdu /home` in front of the class and demonstrated how, without exception, everyone with >100MB of disk usage on the class server was a VSCode user.
3. I set a user process limit of 45, because the VSCode RAT (somehow) uses ~50 Node processes. When students inevitably ignored the motd and the in-class warning, they hit the process cap and had to ask us to kill their processes in order to get back onto the system.
4. I replaced the process limit with a script that kills all the .vscode-server RATs every 10 seconds.
- bogantech 2y agoDisable TCP forwarding in SSHD
- kalleboo 2y agoYour comment is bringing back so many memories of being in university and working around the anachronistically strict limits the uni sysadmins had on the network
- jaygreco 2y agoAh yes, one of my favorite skills learned in school was how to work around arbitrary rules made up by cranky sysadmins! I still use it all the time. The smart kids (whom I’m sure look like they are learning that precious openssh client) are doing their assignment locally or on a free tier VPS with VS Code and scping the thing over when it’s done. They’re also smart enough to learn openssh when they need it IRL.
- ytans 2y agoIn the class which I have managed the infrastructure for, we have 1 to 2 students per VM, so this is less of an issue and there aren't any restrictions. One of the reasons we provide the VMs is so that students can experience working in a remote server environment. The concern that I have is that these remote ssh tools allow you to bypass learning/practicing how to perform basic actions, e.g. cd, read/edit files. Granted, as mentioned, you can scp/rsync (or git pull), but at least this seems to be more appropriate when you eventually need to interact with a real production server.
- darkwater 2y agoAnd then HN complains that new software is crap that wastes too much resources and new developers don't want to optimize resources...
- kalleboo 2y agoIn my day the new crap that wastes too much resources was the GNU software we wanted to run on the schools Solaris machines :)
- bkallus 2y agoI too have these fond memories, and I enjoy passing it on to the next generation :)
- kalleboo 2y agoDoing god's work, I approve!
- causal 2y agoCan you explain why though? I get that you had to put a lot of effort into blocking VSCode but it's not clear what have VSCode caused to motivate this.
- oarsinsync 2y agoIt sounds like they’re operating at larger scales, with a large number of users sharing a resource. Each user spawns 50 processes and consumes 100MB of space if they’re using VSCode. Assuming a low count of 1000 users, that’s 50K running processes and 100GB of space consumed. To enable a text editor.
- coder543 2y ago100GB of storage is… not much for 1000 users. A 1TB NVMe SSD is $60. So 100GB is a total of $6 of storage… or about half a penny per user. And that’s for SSD storage… an enterprise-grade 14TB hard drive is only $18/TB on Amazon right now, less than a third of the SSD price per TB. Call it 100GB = $2 of storage, total, to enable 1000 users to run the editor of their choice. So, no, I’m not seeing the problem here. If you really wanted to penny pinch (one whole penny for every 5 users), I think you could use btrfs deduplication to reduce the storage used.
- aragilar 2y agoThat's ram, not disc.
- coder543 2y agoNo… it’s not. To quote the message earlier in the thread, that message said “everyone with >100MB of disk usage on the class server was a VSCode user.” 100MB * 1000 users is how the person I responded to calculated 100GB, which is storage.
- homebrewer 2y agoHe also mentioned 50 node processes, so it would be way higher than 100 MB of RAM, I agree.
- _zoltan_ 2y agowho are you to decide what the students can learn or not learn?
- joshstrange 2y agoThe provider of the servers? If the students want to use their own server, I’m sure they’re free to do whatever they want. Also VS code has plug-ins that just SFTP the files up.
- saagarjha 2y agoStudents are frequently not allowed to use their own servers.
- bkallus 2y agoWe encourage students to use their own machines. We even loan out old ThinkPads and MacBooks for students to run Linux on. Very few (3-5 per term) take us up on this offer. Most of our students would rather we do the sysadmin stuff for them. The only requirement is that the code needs to run on our server, which they can easily check before submission.
- saghm 2y agoThis isn't something specific to VSCode being popular. When I was in college over a decade ago, there were students using Sublime with an SFTP plugin, coding locally and copying stuff with FileZilla or other similar GUI clients to transfer files (I distinctly remember seeing some program that was named something duck-related but for the life of me I can't remember any other specifics). Sublime in particular could be frustrating in the class I TA'd where they had some assignments to deal with processing some (very basic) machine code to simulate running the tool the class used to assemble and run the code from the (similarly basic) ISA they had been taught, which involved them using hexdump or something similar to understand how the bytes in the files worked, but Sublime "helpfully" would render the object files as as their text representation of the hexdump, with extra spacing for readability and swapped endianness compared to the way the bytes would show up if hexdumped on the school's Linux server. There would always be several students every semester who would show up at office hours unable to figure out why their code that was written to try to read an ASCII string like "AD DE EF BE " but instead would instead find some text they didn't recognize because they didn't think to look at the actual byte values, which would always just happen to start with 0xDE, 0xAD, 0xBE, and 0xEF.
- benwaffle 2y ago> I distinctly remember seeing some program that was named something duck-related but for the life of me I can't remember any other specifics cyberduck - https://cyberduck.io/ https://cyberduck.io/
- saghm 2y agoAha, that does look like what I remember!
- realaether 2y agoOff-topic: just one look at that homepage, the icons in particular, brought back such fond memories of the pre-flat design time. Those halcyon days when it was normal for buttons to look like buttons. (Maybe I'm just using the wrong apps these days.)
- joshstrange 2y ago
- andai 2y ago>50 Node processes Every day we stray further from God.
- formerly_proven 2y agoSELinux exists for precisely these scenarios, use it.
- whalesalad 2y ago[flagged]
- bkallus 2y agoLearning to use a real SSH client is part of the curriculum. If they graduate without this knowledge, we have failed as teachers.
- whalesalad 2y agoThings need to be introduced at the right gradient. If you pile it on all at once, nothing is learned. If you want to teach someone how to use SSH to interact with a server, then that should be a dedicated chapter or portion of the curriculum. Once you are beyond that and it comes down to building programs, you need to eliminate that part of the gradient and focus 100% on mastering the task at hand.
- dang 2y agoCould you please stop posting in the flamewar style to HN? There was no need to cross into personal attack here. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- sn9 2y agoFor those like me who were wondering what "murid" was referring to and had never heard of RAT, it stands for Remote Access Trojan.
- fastasucan 2y agoThis was a major annoyance, so you descided to become an even bigger one?
- collinmanderson 2y ago> 1., I set a motd on our class servers asking the students not to use the VSCode remote server plugin. ...When students inevitably ignored the motd... VSCode doesn't show the motd :/