If you are more GUI-oriented and use one of the more newbie-friendly Linux distros like Ubuntu or Mint, this is another option and does not require any more installations.
You should have nemo as your default file manager. It may not be called "Nemo" on the menu, so go under Help > About
of your file manager ("Files" app) to see.
In nemo, go to File > Connect to server
, enter your remote machine's details (SSH's default port is 22), and then open the files just like any file on your local machine, with whatever editor you prefer. You can even close Nemo and continue working in your editor.
From the address bar, it seems to be using the sftp
protcol.
Just be aware that if your remote host has an inactivity timeout for the SSH connection, this will also prevent you from saving changes in the editor after the timeout has dropped the connection...
vim scp://$USER@$HOSTNAME//etc/passwd