Created
March 21, 2013 13:12
-
-
Save caruccio/5212909 to your computer and use it in GitHub Desktop.
Reusing a shared master ssh connection across many ssh client instances (really fast login after first login).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host my-server # Alias for this server so you can run "$ ssh my-server" | |
#ForwardAgent yes # Use local agent to password-free authentication | |
#User my_user # Name of remote user | |
#IdentityFile ~/.ssh/id_rsa-${MY_SERVER} # I suggest you to use key-pair auth | |
Hostname my.server.fqdn # Real server hostname | |
ControlMaster auto # share a single ssh connection across many ssh instances | |
ControlPersist 60 # send master connection to background, close it if idle for 60 seconds | |
ControlPath ~/.ssh/master/ssh-%h # place local sharing socket in a secure place |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment