back

by sergiotapia·14y ago·view on hn ↗
I agree with learning or at least being a bit familiar with nano. It's probably the best way to edit a small one-off file via SSH.

Imagine you want to quickly change a directory path in httpd.conf, instead of downloading the file, editing and then uploading it via FTP - just nano that sumbitch and you're done.

I learn how to use it in about 30 minutes. That's really all it takes to get the basics down.

1 comments
I would disagree that that's the easiest way.

C-x C-f /ssh:user@host:/path/to/httpd.conf

... and I have it open in my local emacs, with my own settings, with colour and indenting, and no lag when I'm editing. (this is called tramp mode)

And if I then typed M-x eshell, I'd have a shell at the directory where I opened that file, and the nano users would start shouting 'burn the witch!'.

Other editors also support remote editing over ssh - no need to download/upload, the editor takes care of that for you. Working this way, I don't even have to trust that the remote server has nano or emacs or whatever - which it often doesn't.