Mac SSH免密码登录 Linux服务器

方式1:

ssh-copy-id -f -i .ssh/id_rsa.pub root@LinuxServerIP

 

方式2:

#先在mac上将公钥上传到Linux服务器
scp .ssh/id_rsa.pub root@LinuxServerIP:

#然后以root身份登录到Linux服务器上
cat id_rsa.pub >> .ssh/authorized_keys

rm -rf id_rsa.pub

 

posted @ 2021-02-15 15:51  DotQin  阅读(163)  评论(0编辑  收藏  举报