Skip to content

Instantly share code, notes, and snippets.

@suchasplus
Last active September 22, 2020 05:55
Show Gist options
  • Save suchasplus/e84561d1ad06f3979a652392c1640441 to your computer and use it in GitHub Desktop.
Save suchasplus/e84561d1ad06f3979a652392c1640441 to your computer and use it in GitHub Desktop.
reuse openssh connection
$ cat .ssh/config
Host *
VisualHostKey yes
Compression yes
ServerAliveInterval 60
#PasswordAuthentication no
ControlMaster auto
ControlPersist 4800
ControlPath ~/.ssh/control/%r.%h.%p.sock
#ssh-keygen -t rsa -C "[email protected]" -f github_rsa
#ssh-keygen -t rsa -C "[email protected]" -f company_rsa
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/github_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment