f ssh passwordless 在HA切換下要執行的兩行指令 ~ 迪貝之家

ssh passwordless 在HA切換下要執行的兩行指令

ssh-keygen -f "/var/lib/nagios/.ssh/known_hosts" -R ur_cluster_ip(x.x.x.x)

# Host x.x.x.xfound: line 32
/var/lib/nagios/.ssh/known_hosts updated.
Original contents retained as /var/lib/nagios/.ssh/known_hosts.old
nagios@dbamgr02:~$ ssh-copy-id oracle@x.x.x.x
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/nagios/.ssh/id_rsa.pub"
The authenticity of host 'x.x.x.x (x.x.x.x)' can't be established.
ECDSA key fingerprint is SHA256:KfrSx0EeciroLh9z56vOCBEk4xXe+4SCvE9qUO4rzDs.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system.
(if you think this is a mistake, you may want to use -f option)