方法1:安装命令
yum -y install openssh-clients
[postgres@pgmaster ~]$ ls -l /usr/bin/ss* | grep /usr/bin/ssh-copy-id
-rwxr-xr-x 1 root root 12676 Mar 8 2021 /usr/bin/ssh-copy-id
ssh + Tab键发现有ssh-copy-id命令了
方法2、无需安装命令
不安装也可以省事的办法是:
cat /root/.ssh/id_*.pub | ssh user@ip ‘cat >> .ssh/authorized_keys’
(这个是在管理机器上执行)
原文链接:https://blog.csdn.net/qq_42591334/article/details/109604093