获取.pem文件
左侧菜单 选择 密钥对
创建密钥对 -> 自动下载获得 .pem
绑定密钥对
重启EC2机器
客户端登陆阿里云linux(mac)
ssh -i xxx.pem root@ip
遇见问题:
Please contact your system administrator.
Add correct host key in .ssh/known_hosts to get rid of this message.
Offending ED25519 key in .ssh/known_hosts:9
Host key verification failed.
原因:A的known_hosts文件中记录的B的公钥1 与 连接时B传过来的公钥2不匹配
解决方法:删除A的known_hosts文件中记录的B的公钥(手动进行,不适用于自动化部署情形)