Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[edpm_ssh_known_hosts]Fix hostname pattern
Originally the role generated hostnames in the known_hosts file with the following pattern: [edpm-compute-0]*,... This pattern does not work as it does not match with the edpm-compute-0 hostname: [root@edpm-compute-0 ~]# ssh edpm-compute-0 The authenticity of host 'edpm-compute-0 (192.168.122.100)' can't be established. ED25519 key fingerprint is SHA256:ba66xyWDSkO0qv/9EATAZWT4NHhgDnScka4U7FIreaY. This host key is known by the following other names/addresses: /etc/ssh/ssh_known_hosts:4: [edpm-compute-0]* Are you sure you want to continue connecting (yes/no/[fingerprint])? According to the ssh docs * and ? can be used for globbing. However [] can only be used for defining hosts with non default ssh port in the form of [hostname]:portnumber. Based on my testing on EDPM nodes. The globbing does not work for port numbers even if I add the missing ':'. Our ssh server in EDPM runs on the default port so the []: format is not at all needed. Also we have separate hostkeys for each node so globbing on the hostname does not needed either. This PR removes the unnecessary complication from the known_hosts generation and therefore fixing the hostname matching during host key verification.
- Loading branch information