Last active
December 14, 2015 00:09
-
-
Save danhyun/4997146 to your computer and use it in GitHub Desktop.
set up ssh config
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
[root][henry][~] | |
$ cd ~/.ssh | |
[root][henry][~/.ssh] | |
$ ll -tr config | |
-rw-r--r-- 1 root root 143 2012-10-04 13:06 config | |
# note the permissions -> user:group [644] | |
[root][henry][~/.ssh] | |
$ cat config | |
Host * | |
PreferredAuthentications publickey,keyboard-interactive | |
ServerAliveInterval 120 | |
ServerAliveCountMax 30 | |
IdentityFile /tmp/secretkeyinanunorthodoxlocation | |
Host stagingNickname | |
User stagingUser | |
Hostname staging.vindale.com | |
IdentityFile /tmp/Staging_key | |
Host foosauce | |
User barsauce | |
Hostname some.different.server | |
IdentityFile /tmp/foobarworld.rsa | |
# now you can just simply say | |
$ ssh foosauce | |
$ ssh stagingNickname | |
# you get scp for free as well! | |
$ scp foosauce:/opt/tomcat/webapps/app.war ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment