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

posted @ 2020-04-13 09:41  Console666  阅读(774)  评论(0编辑  收藏  举报