当前公钥如下 test.pub.pem
私钥如下 test.pem
ssh-copy-id -i ./test.pub.pem root@1.2.3.4
/usr/bin/ssh-copy-id: ERROR: failed to open ID file './test.pub.pem.pub': No such file
可以到有错误提示,将公钥名称改一下
mv test.pub.pem test.pem.pub
重新执行拷贝命令,执行成功
ssh-copy-id -i ./test.pem.pub root@1.2.3.4