手表网站域名,七牛cdn wordpress,南京网上注册公司流程,找素材的网站大全文章目录 小结问题解决参考 小结
Xshell远程登录AWS EC2 Linux实例碰到些问题#xff0c;进行解决并记录。
问题
在AWS中创建 EC2 Linux实例#xff0c;生成的非对称密钥对#xff0c;使用Xshell远程登录碰到一些问题。
解决
首先在Putty中可以使用的ppk密钥文件在Xshe… 文章目录 小结问题解决参考 小结
Xshell远程登录AWS EC2 Linux实例碰到些问题进行解决并记录。
问题
在AWS中创建 EC2 Linux实例生成的非对称密钥对使用Xshell远程登录碰到一些问题。
解决
首先在Putty中可以使用的ppk密钥文件在Xshell中是使用不了的需要使用PUTTYGEN.EXE进行导出为Open SSH的密钥导出密钥后使用Xshell进行登录。这里注意完程主机是存放的公钥本地主机存放的是私钥用来登录远程主机。
碰到的第一个问题选择公钥后反复弹出同样的SSH User Authentication界面这里我碰到的问题是登录的用户名写错了区别大小写例如administrator写成了Administrator改好后就可以登录了。
碰到的第二个问题是从Linux机器登录失败。
创建了/root/.ssh/id_rsa文件并的是先前PUTTYGEN.EXE生成的Open SSH的密私钥写入内容类似如下
[rootMaster ]# cat /root/.ssh/id_rsa
-----BEGIN RSA PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyyyyyyy
..........
-----END RSA PRIVATE KEY-----
[rootMaster ]#
进行登录报以下错
[rootMaster ]# ssh -vvv administrator1.2.3.4
...
debug1: Trying private key: /root/.ssh/id_rsaWARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0644 for /root/.ssh/id_rsa are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key /root/.ssh/id_rsa: bad permissions
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /root/.ssh/id_ecdsa
debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /root/.ssh/id_ed25519
debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /root/.ssh/id_xmss
debug3: no such identity: /root/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
administrator1.2.3.4: Permission denied (publickey).
进行以下修改权限操作解决问题
[rootMaster ]# chmod 700 /root/.ssh/id_rsa参考
Alibaba Cloud: Putty PPK file to Xshell key file for use CSDN: Putty的ppk文件转成Xshell使用的key文件 Access EC2 instance using Putty How To Configure SSH Key-Based Authentication on a Linux Server AWS User Guide for Linux Instances - Create key pairs