linux 使用scp传输公钥时要注意事项

1、目标服务器是否开启 openssh-server

2、注意服务器的端口是多少 如果端口不对scp 要加端口参数

3、一定要注意端口参数P 是大写

4、查看ssh 端口号 cat /etc/ssh/sshd_config

格式如下:
scp -P 13022 /root/.ssh/id_rsa.pub user@ip:/root/.ssh/authorized_keys

原文地址:https://www.cnblogs.com/xybs/p/12689474.html