... and at the end of ~/.ssh/config:-
#
# 'global' options
#
Host *
User chris
~
~
chris$ ssh caracal
chris@caracal.mythic-beasts.com's password:
The man page for ssh_config says, right at the start: "For each
parameter, the first obtained value will be used.".
I have quite a long ~/.ssh/config file.
I have been trying to rationalise it a bit and share bits that are
common to several systems. So I have two sections referring to a
host that I call 'caracal', the first is:-
#
#
# Mythic Beasts hosting
#
Host mb caracal
HostName caracal.mythic-beasts.com
User chrisisbd
... and at the end of ~/.ssh/config:-
#
#
# Options shared by non-root systems
#
Host cheddar halon caracal mb hostinger oasis41
PermitLocalCommand=yes
LocalCommand rsync --update --delete -a ~/.cfg/ %h:.cfg/
AddKeysToAgent=yes
#
#
# 'global' options
#
Host *
User chris
~
~
So, to my mind when I enter 'ssh caracal' at the command line the user
name used by ssh should be chrisisbd as that's the first value for
User that applies to caracal in the config file. But this isn't what happens, the user is set to 'chris':-
chris$ ssh caracal
chris@caracal.mythic-beasts.com's password:
The man page for ssh_config says, right at the start: "For each
parameter, the first obtained value will be used.". The caracal entry
in the config file has definitely been found as ssh is trying to
connect to caracal.mythic-beasts.com but the 'User chrisisbd' seems to
be overriden by the 'User chris' at the bottom of the config file.
Surely this isn't what the man page says?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 147:54:58 |
Calls: | 10,383 |
Calls today: | 8 |
Files: | 14,054 |
D/L today: |
2 files (1,861K bytes) |
Messages: | 6,417,737 |