# ssh with multiplexing.
ssm() {
- sl -oControlPath=/tmp/ssh_mux_%u_%h_%p_%r "$@"
+ sl -oControlPath=$HOME/.cssh_%u_%h_%p_%r "$@"
}
# ssh solo, without multiplexing. # currently the default, but I might switch back.
sss() {
# forgetting to use confighome, and then after specifying it,
# it uses the multiplex socket, which means that the different
# key in confighome is not actually used unless we do ssh -O exit HOST.
- sed 's,^IdentityFile ~/\.ssh/home$,IdentityFile ~/\.ssh/h\nControlPath /tmp/ssh_hmux_%u_%h_%p_%r,' /root/.ssh/confighome >/root/.ssh/config
+ sed 's,^IdentityFile ~/\.ssh/home$,IdentityFile ~/\.ssh/h\nControlPath ${HOME}/.chssh_%u_%h_%p_%r,' /root/.ssh/confighome >/root/.ssh/config
fi
chown -R root:root /root/.ssh