将.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