我試圖從一個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正確的相關文件 –