Why setting host github.com is fine, but host GitHub isn't
#176458
-
|
I've created a ed25519 file
But when I change the Host (alias?) in
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
When using |
Beta Was this translation helpful? Give feedback.
-
|
Hey, the Host in your SSH config is what you use in your command. When you changed it to ssh -T git@GitHub(not If you want both to work, use: The Host line is basically the alias/pattern that SSH looks for when you type your command. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks to @ellebrink and @luke21678-eng❤️, so why linking to GitHub behaves different from linking to an IP? For example, I have a server
|
Beta Was this translation helpful? Give feedback.
You're welcome @Saltsmart! Feel free to accept my answer above so other users with the same problem can easily find it.
As for your other question: actually,
ssh [email protected]is not matching yourHost Serverentry. It's just connecting directly to the IP without using your config at all. SSH doesn't need a config file to connect to an address.The
Hostdirective only matches what you type in the command. From the manual: "matched against the host name given on the command line".To use your
Host Serverconfig, you'd need to runssh Server(then it applies the HostName, User, etc.).Both GitHub and your IP work the same way:
Hostis always a pattern matcher for what you type, never…