software/ssh
================ SSH ================
Escape Sequences
~? (tilde question mark) displays the escape sequences. Notably, ~. kills the connection (eg, if the other end has hung), and ~^Z backgrounds the shell (so you can mess around locally).
~/.ssh/config
To “reuse” a single SSH connection between multiple shells/pipes/scp::
ControlPath ~/.ssh/master-%l-%r@%h:%p
ControlMaster auto
Enable compression over remote connections with fast machines::
Compression yes
SSH Key Agent Timeout
ssh-agent
has an argument (-t
) to timeout private keys. You’ll need to enable this flag in your X initialization file somewhere… on Ubuntu it seems to be in /etc/X11/Xsession.d/90x11-common_ssh-agent
(set SSHAGENTARGS='-t 6h'
for six hour timeout).