我试图从一个centos 7机器上ssh进入我的ec2实例。我已将.pem文件添加到.ssh文件夹。运行ssh时权限被拒绝错误
我错过了什么?
[[email protected] .ssh]# cd /home/###/.ssh/
[[email protected] .ssh]# ls
##.pem
[email protected] .ssh]# ssh [email protected] -vvv
debug1: Trying private key: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa: No such file or directory
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
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
你试过'sudo'然后运行命令吗? – Option
查看https://wiki.centos.org/HowTos/Network/SecuringSSH特别确保你CHMOD正确的相关文件 –