Skip to content

Instantly share code, notes, and snippets.

@lesstif
Last active April 3, 2019 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lesstif/fb1e3ea9d17920ec02b260189094b909 to your computer and use it in GitHub Desktop.
Save lesstif/fb1e3ea9d17920ec02b260189094b909 to your computer and use it in GitHub Desktop.
~/.ssh/config
Host gitlab
HostName gitlab.com
User git
PubkeyAcceptedKeyTypes +ssh-rsa
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitlab-key/id_rsa
Host github
HostName github.com
User git
Port 22
PreferredAuthentications publickey
IdentityFile ~/.ssh/github-key/id_rsa
Host gist
HostName gist.github.com
User git
Port 22
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Host my-dev
HostName 192.168.0.214
User lesstif
Port 9022
PreferredAuthentications publickey
IdentityFile ~/.ssh/dev/id_rsa
## Host 를 * 로 지정하면 위에서 설정한 Host를 제외하고 모든 Host 에 적용됨
Host *
User lesstif
PreferredAuthentications publickey, password
IdentityFile ~/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment