My current .ssh/config file has below config.
Host *
FingerprintHash sha256
StrictHostKeyChecking yes
PasswordAuthentication no
GSSApiAuthentication no
KbdInteractiveAuthentication no
CheckHostIP yes
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
Port 28282
And I want to add another rule applies only for one host ip(1.2.3.4).
So, I added below rules in .ssh/config file.
Host 1.2.3.4
Hostname 1.2.3.4
Port 22
But the first wider rule keeps affecting to 1.2.3.4 rule.
I want to ssh to 1.2.3.4 only with default settings like login with password(not affected by * rules).
When I run ssh -v root@1.2.3.4
, it shows below message(looks * rule is applied). And keep trying through port 28282.
debug1: /home/ryan/.ssh/config line 23: Applying options for *
debug1: /home/ryan/.ssh/config line 74: Applying options for 1.2.3.4
..
debug1: Connecting to 1.2.3.4 [1.2.3.4] port 28282.
debug1: connect to address 1.2.3.4 port 28282: Connection refused
What do I need to change to login with password and port 22 to 1.2.3.4?
Thanks in advance.
Host *
might be relevant.