將.ssh文件夾的所有者從用戶更改爲root後,我無法用ssh登錄遠程服務器。這裏是錯誤信息:AWS無法使用SSH登錄
OpenSSH_6.9p1, LibreSSL 2.1.7
debug1: Reading configuration data /Users/qj/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Connecting to ec2-52-193-83-231.ap-northeast-1.compute.amazonaws.com [52.193.83.231] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file gmail.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file gmail.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to ec2-52-193-83-231.ap-northeast-1.compute.amazonaws.com:22 as 'ec2-user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client [email protected] <implicit> none
debug1: kex: client->server [email protected] <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:EahONyMKzM6Q4tdEBSa9LwyOFI65KB02GesJGuGE9Ss
debug1: Host 'ec2-52-193-83-231.ap-northeast-1.compute.amazonaws.com' is known and matches the ECDSA host key.
debug1: Found key in /Users/qj/.ssh/known_hosts:25
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/qj/.ssh/dqj
debug1: Authentications that can continue: publickey
debug1: Trying private key: gmail.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
這真的是我的錯,更改.ssh文件夾的所有者。 任何人都可以幫我〜
似乎你需要啓動一個新的服務器,並使用附加的EBS卷(如果有需要的數據)。 –
沒有其他靈魂嗎?例如從AWS管理器系統創建新用戶。 – Qijin