获取.pem文件
- 左侧菜单 选择 密钥对
- 创建密钥对 -> 自动下载获得 .pem
- 绑定密钥对
- 重启EC2机器
客户端登陆阿里云linux(mac)
ssh -i xxx.pem root@ip
遇见问题
Please contact your system administrator.
Add correct host key in /Users/xsun/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xsun/.ssh/known_hosts:54
ECDSA host key for 121.55.xxx.xx has changed and you have requested strict checking.
Host key verification failed.
解决方案
ssh-keygen -R 你要访问的IP地址
还有可能遇见权限不够
chmod 400 {私钥 .pem 文件的完整路径}
远程传输文件
scp -i xx.pem conf.zip root@ip:/root/folder