if you need to make an edit to a file on a remote server simply
vim scp://hostname.example.com//path/to/file.txt (will require username on remote host to be the same as what you have on screen)
root@g33k4l1f3.com's password: (enter pw)
Press ENTER or type command to continue (hit enter, file opens, make edits, then save and close)
:wq
root@g33k4l1f3.com's password: (enter pw)
#
root@g33k4l1f3.com's password: (enter pw)
Press ENTER or type command to continue (hit enter, file opens, make edits, then save and close)
:wq
root@g33k4l1f3.com's password: (enter pw)
#
Or, if you need to connect as a different user:
$ vim scp://user@hostname.example.com//path/to/file.txt
If you need to specify an alternate port, use the familiar colon (:) syntax:
$ vim scp://user@hostname.example.com:5757//path/to/file.txt
That’s all there is to it! The file is read into VIM from the remote system, if it exists. Then, you are free to make changes. When you save, changes are written to the remote system.
January 9th, 2012 at 3:23 am
I dugg some of you post as I cerebrated they were very helpful extremely helpful
January 10th, 2012 at 2:11 am
Its fantastic as your other posts : D, appreciate it for putting up. “There’s no Walter Cronkite to give you the final word each evening.” by William Weld.
March 31st, 2012 at 11:46 pm
What a great post. Thank you and keep up the great work!
April 26th, 2012 at 6:11 pm
Another great article.