Last active
August 29, 2015 14:08
-
-
Save coalwater/e8bf9cc9acf65d6e656d to your computer and use it in GitHub Desktop.
Using different ssh keys for different hosts
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 vps1 | |
IdentityFile ~/.ssh/vps1 | |
Port 5432 | |
Hostname 11.22.33.44 | |
User root | |
Host vps2 | |
IdentityFile ~/.ssh/vps2 | |
Port 22 | |
Hostname 12.34.56.78 | |
User vpsuser |
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 myVps | |
IdentityFile ~/.ssh/vps | |
Port 5432 | |
Hostname 11.22.33.44 | |
User root |
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 [name] | |
IdentityFile [path_to_private_key] | |
Port [ssh_port_number] | |
Hostname [actual_server_address_or_hostname] | |
User [ssh_connection_user] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment