Hacker News new | ask | show | jobs
by mattlondon 2970 days ago
Its handy to be able to make changes on remote servers there and then without too much messing about.

E.g if you are connected to a remote server and you need to change a file, how do you do it with say VSCode or Sublime etc? Download it to your machine, edit it, save it, then re-upload? Sure that works for the occasional once-a-month kinda thing, but it is a bit convoluted.

It is much easier and faster to just edit the file there and then on the server. Especially if you are doing multiple changes.

Vi really is very simple - you just need to remember esc, i, x and :wq and that is basically all you need to know to be able to do basic edits a file on pretty much ANY server you'll ever connect to (except perhaps windows or a super-stripped down cloud image).

2 comments

On KDE you can mount the SSH system as local and use your usual tool set. Or Krusader integrates an editor or passes off to Kate for editing (or kdiff3 for file compare or whatnot).

As long as I have nano or can apt-install it then I'm happy to ssh in and do it that way; but it doesn't seem more convoluted to use GUI tools necessarily.

I'd say mounting a remote filesystem is convoluted when you can just edit with vi :-)
It's one click; it's not my normal way of working but one could make it no click, just needing connected to systems when not working on them (or monitoring) seems unwise.
Thank you for the response! Good to know.