SSH recipes/ricette SSH

Hereby you will find some simple ssh recipes that i find useful at work.
Qui troverete qualche ricetta per usare ssh al lavoro…

Are you working on a firewalled connections that hangs every 39,5 seconds? State lavorando su una connessione ssh che si impicca ogni 39.5 secondi ?

ssh -Xl -o TCPKeepAlive=no -o ServerAliveInterval=15

Have you need to rsync something on an unstable ssh connection?
Avete bisogno di “rsyncare” qualcosa su una connessione instabile?

rsync -avz -e "ssh -o ConnectTimeout=2 -o ServerAliveInterval=2 -ServerAliveCountMax=2" < USER >@< SRC SERVER > < DEST DIR/SERVER >
rsync -avz -e "ssh -o ConnectTimeout=2 -o ServerAliveInterval=2 -ServerAliveCountMax=2" pippo@ .

Comments are closed.