方式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
方式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