Last active
April 11, 2018 03:58
-
-
Save tsuyoshicho/8f6d1004e8b0e22278337a9fbc9d5b0a to your computer and use it in GitHub Desktop.
ssh_configでの落とし穴 ref: https://qiita.com/tsuyoshi_cho/items/90038d14da3a71a84aba
This file contains hidden or 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
| # Github | |
| Host github.com | |
| # Alt/Use for Over HTTPS at 443 | |
| # Hostname ssh.github.com | |
| # Port 443 | |
| Hostname github.com | |
| # gist(use ssh) | |
| Host gist.github.com | |
| # Over HTTPS | |
| # Hostname ssh.github.com | |
| # Port 443 | |
| Hostname gist.github.com | |
| # altssh server direct setting | |
| Host ssh.github.com | |
| Hostname ssh.github.com | |
| Port 443 | |
| # 2nd or later account | |
| # Example | |
| Host example.github.com | |
| Hostname github.com | |
| # key define : first match check | |
| IdentityFile ~/.ssh/id_rsa.github.example | |
| # github common setting | |
| Match originalhost github.com,gist.github.com,ssh.github.com | |
| IdentityFile ~/.ssh/id_ecdsa.github | |
| IdentityFile ~/.ssh/id_ed25519.github | |
| # fallback | |
| IdentityFile ~/.ssh/id_rsa.github | |
| # github global setting | |
| Host *github.com | |
| User git | |
| TCPKeepAlive yes | |
| IdentitiesOnly yes | |
| Compression yes | |
| # Note:key | |
| # https://api.github.com/users/tsuyoshicho/keys |
This file contains hidden or 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
| $ ssh -G [email protected] | |
| user git | |
| hostname github.com | |
| <中略> | |
| identityfile ~/.ssh/id_rsa.github.example | |
| identityfile ~/.ssh/id_ecdsa.github | |
| identityfile ~/.ssh/id_ed25519.github | |
| identityfile ~/.ssh/id_rsa.github | |
| <後略> |
This file contains hidden or 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
| # operation server | |
| Host op.example.com | |
| User tsuyoshicho | |
| TCPKeepAlive yes | |
| IdentitiesOnly no | |
| PubkeyAuthentication no | |
| ProxyCommand none | |
| # server instance | |
| Host dev1.example.com | |
| Hostname [2001:db8::1] | |
| User tsuyoshicho | |
| TCPKeepAlive yes | |
| # key define : first match check | |
| IdentityFile ~/.ssh/id_rsa.example | |
| IdentitiesOnly yes | |
| ProxyCommand none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment