MAC远程无密码连接阿里云
进入或创建.ssh文件:
cd ~/.ssh
mkdir ~/.ssh
密钥生成:
ssh-keygen -t rsa
拷贝公钥到远程主机:
cd ~/.ssh
scp id_rsa.pub root@IP地址:~/.ssh/id_rsa.pub
将证书写入到authorized_keys
ssh root@IP地址
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
删除证书:
rm id_rsa.pub
exit