Recently, I discovered that SSH have some wonderful features and usages that I didn’t know before.
rsync via SSH
When it comes to copying files back and forth to a remote server, I usually go for
scp even supports to copy a whole directory:
Not until recently, a colleague of mine, Alex, taught me that using
rsync happens to be faster than
scp when it comes to syncing directories between local and remote server.
The result is fascinating! It is much much faster than
scp when it comes to hundreds of files need to be synced. Better,
rsync only copy files that has been changed.
There are some more advanced use cases with
rsync and SSH like you can establish somehow a
rsync daemon on the remote server so that you can sync files/directories over a bastion host. See “Advanced Usage” on man page of
I usually have a need to log in to the server and do a
git clone on that server for testing some code.
Cloning a repository via SSH on a remote server requires that server to have an SSH key-pair registered..
…unless we use
Using SSH Agent Forwarding allows me to SSH into a remote server and do
git clone on without the need to actually transfer my private key to that server.