ssh key文件登录服务器

来源:互联网 发布:多益网络邮编地址 编辑:程序博客网 时间:2024/06/05 14:02

服务端生成  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

0 0