Skip to content

Instantly share code, notes, and snippets.

@nlacourte
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save nlacourte/9978987 to your computer and use it in GitHub Desktop.

Select an option

Save nlacourte/9978987 to your computer and use it in GitHub Desktop.
SSH config params with master connection
#!/bin/bash -eu
find /tmp/ -maxdepth 1 -name 'ssh-*.sock' -exec ssh -S '{}' localhost -O exit \;
Host *
ForwardX11 yes
ForwardAgent yes
PreferredAuthentications publickey
ControlMaster auto
ControlPersist yes
ControlPath /tmp/ssh-%r-%h-%p.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment