Navigation

Copying large amout of files/dirs over SSH using RSYNC

To copy files from remote server to local:

rsync -vrplogDtH -e ssh user@remotehost:/remote/location /this/dir/

To copy files from local to remote server:

rsync -vrplogDtH /this/dir/ -e ssh user@remotehost:/remote/location

-v, --verbose increase verbosity
-r, --recursive recurse into directories
-p, --perms preserve permissions
-l, --links copy symlinks as symlinks
-o, --owner preserve owner (super-user only)

How to fix ssh timeout problems

If you use ssh a lot, you may have noticed that your ssh session times out and you’re logged out every once in a while.

For example while you were using SecureCRT, you got:

The semaphore timeout period has expired

The solution is to send a protocol NO-OP every few seconds to keep the connection alive.
Usually SSH clients have this feature disabled and you can enable it.
SecureCRT has this feature on:
Right click on host -> Properties
or
Right click on the host tab -> Session Options