Created
January 30, 2018 00:15
-
-
Save matttrent/0fe70211d9b7b93b6b82fc4b91b54e70 to your computer and use it in GitHub Desktop.
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
The Host line can contain multiple strings (and wildcard matches). | |
With this config: | |
Host deeplearn-v100 ec2-XXX-XXX-XXX-XXX.us-west-2.compute.amazonaws.com | |
HostName ec2-XXX-XXX-XXX-XXX.us-west-2.compute.amazonaws.com | |
User ubuntu | |
IdentityFile ~/.ssh/aws-key.pem | |
IdentitiesOnly yes | |
ForwardAgent yes | |
LocalForward 9999 localhost:8888 | |
LocalForward 6006 localhost:6006 | |
I can use the CLI as: | |
$ ssh deeplearn-v100 | |
I can also use the CLI as with the same SSH config: | |
$ ssh ec2-XXX-XXX-XXX-XXX.us-west-2.compute.amazonaws.com | |
So I can use the shortcut for convenience, and any program that SSHs to that hostname will automatically be logged in. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment