服务端生成 pem
ssh-keygen -t rsa
pem文件传到客户端,客户端用该文件登录
ssh -i xx.pem username@serverip
提示
Permissions 0644 for 'test.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
需要chmod 600 xx.pem
退出ssh,敲exit