//Random Tip
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow

You are viewing a random entry, refresh your browser to change.

You can directly edit a file on a remote host with the following:

vim scp://username@host//path/to/file

Of course you can use a different editor if you *really* want to ;)


View Comments »



Comments 

Add your comment

Comments are currently disabled
Mike
Well it doesn't seem to work with every editor. Tried 'nano' just for fun, didn't recognize. Of course vim does.
Posted 2009-03-31 12:04:53
John
This only works with vim, and only if it has the netrw plugin installed.  Most distros have this plugin installed by default though.
Posted 2009-03-31 12:48:53
SteveG
I guess when the submitter said you can use a different editor he meant if you don't want to do cool things like this :)
Posted 2009-03-31 13:00:49
BillH
I listen for SSH connections on a different port, so a parameter is necessary, such as:  `scp -P 22222 username@host:~/myfile`.  Any ideas on how to pass a port parameter?
Posted 2009-04-05 13:18:02

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit