Quote:
Originally Posted by noir911
I'm using ~/.ssh/config to ssh to various hosts. I have a different user name that is not in the global settings but is defined in the local setting for that host. If I ssh to that host, I still get the global user name. How can I change this?
My ~/.ssh/config
Code:
# Site-wide defaults for some commonly used default options
Host *
ForwardX11 yes
ForwardX11Trusted yes
ForwardAgent yes
ForwardX11 yes
Protocol 2
Port 22
User chris
IdentityFile /home/chris/ssh_keys/chris_ssh_keys
Compression yes
Host weldpond
HostName ssh1.company.tld
Host rekon
User ben
Hostname ssh2.company.tld.
Thanks.
|
Seems okay, as far as I can tell. Only irregularity I can see is that on the last line you used "Hostname", whereas the man page says "HostName".
You are using the shortcut hostname when you ssh, right? It should be "ssh rekon" in your case.