Piping Output Over a Secure Shell (SSH) Connection

We all know about using scp to transfer files over a secure shell connection. It works fine, but there are many cases where alternate modalities of usage are required, for example, when dealing when you want to transfer the output of one program directly to be stored on a remote machine. Here are some ways of going about doing this. Let "$PROG" be a program that writes data to the standard output stream. Then: Transfering without compression: $PROG | ssh destination.ip.address Read more [...]

Editing Remote Files With Your Local Vim Using the SCP Protocol

I love Vim! It is so easy enough to edit a remote file with my local Vim through the Secure Copy protocol: $ vi scp://user@remote.host.com/projects/foo/bar.py However, I often find myself wishing that bash completion was available to expand/complete paths on the remote system. Furthermore, when editing files outside of my home directory hierarchy, I have to remember to add an extra slash after the host name, e.g.: $ vi scp://user@remote.host.com//var/www/html/index.htm A solution Read more [...]