+++ date = "2024-01-17T17:02:41+00:00" lastmod = "2024-01-17T17:02:41+00:00" tags = [ "gists" ] +++ Some [SSH](https://en.wikipedia.org/wiki/Secure_Shell) options are worth tweaking when directly distributing code with [git](https://git-scm.com/) to multiple remotes. [ConnectTimeout](https://www.man7.org/linux/man-pages/man5/ssh_config.5.html#:~:text=ConnectTimeout) and [BatchMode](https://www.man7.org/linux/man-pages/man5/ssh_config.5.html#:~:text=BatchMode) (optionally for automation). [ControlMaster](https://www.man7.org/linux/man-pages/man5/ssh_config.5.html#:~:text=ControlMaster) enables multiplexing for session sharing via sockets. ```cfg { caption="An example ~/.ssh/config or /etc/ssh/ssh_config" } ForwardX11 no Compression no ConnectTimeout 3 ServerAliveCountMax 1 ServerAliveInterval 10 Host * ControlMaster auto ControlPersist yes ControlPath ~/.ssh/sockets/%r@%h-%p ``` `%r@%h-%p` [translates](https://www.man7.org/linux/man-pages/man5/ssh_config.5.html#TOKENS) to `user@hostname-22`.