阿里云ssh免密码登录配置

将 127.0.0.1 替换为你ECS的IP地址

1
2
cd ~/.ssh
scp id_rsa.pub root@127.0.0.1:~/

登录远程服务器配置

1
2
3
4
5
6
7
8
9
ssh root@127.0.0.1
root@aliyunserver:~# ls
id_rsa.pub
root@aliyunserver:~# cat id_rsa.pub >> .ssh/authorized_keys
-bash: .ssh/authorized_keys: No such file or directory
root@aliyunserver:~# mkdir .ssh
root@aliyunserver:~# cat id_rsa.pub >> .ssh/authorized_keys
root@aliyunserver:~#