So, my local address keeps on changing on my Lan. Can't change the dhcp settings. Addresses are all like: 192.168.A.x, 192.168.A.y, 192.168.A.z. When I switch off the dhcp server, next time it gives 192.168.B.x, 192.168.B.y, 192.168.B.z. It keeps x, y and z constant.
So, i have tried to edit ~/. ssh/config like this
Host pc1
HostName pc.local
User xx
Port 22
Host pc2
HostName "192.168.???.n1"
User xx
Port 22
Host pc3
HostName "192.168.*.n2"
User xx
Port 22
Calling ssh pc1 works fine.
Also using ssh 192.168.A.x with the full adress works.
But, calling ssh pc2 gives the error could not resolve hostname 192.168.???.n1
Hostbut not inHostname. – AlexD Jan 12 '22 at 16:29