In ssh
configuration directory, the file known_hosts
stores for each server the (IP, fingerprint) couple. A server is trusted only if it matches both the elements of one of the couples in known_hosts
.
I need to connect to a Nitrux 1.1.4
Linux server (based on kernel 4.14.15-041415-generic
) which for several reasons is forced to use DHCP. Its IP may vary even several times per day. Each of these times, I must accept a new couple (IP, fingerprint), flooding known_hosts
. This solution is also quite unuseful.
Is it possible to trust this host only considering its fingerprint, regardless of its IP?
As in a previous question, I am using these clients: OpenSSH_7.8p1, OpenSSL 1.1.1a-freebsd 20 Nov 2018
and OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
.
known_hosts
file is in this format? Withssh-keygen -H -F hostname
I can read the interested line, but hostname and IP are still hashed, not in plain text. – BowPark May 27 '19 at 11:34ssh
with-o 'CheckHostIP=no'
when there is no entry in your known_hosts, it will add the entry without IP address. But keep in mind possible security consequences. If you want to keep the mask, looks like you need to hash it manually. I'm not sure about that. – rush May 27 '19 at 14:49