AWS EC2 Linus 实例上的 SSH 权限问题

AWS EC2 Linus 实例上的 SSH 权限问题

当运行尝试连接到 github 时,我得到以下信息:

$ ssh -T [email protected]
Permission denied (publickey).

这是我对该目录的权限:

$ ls -la ~/.ssh
total 24
drwxr-xr-x 2 ec2-user ec2-user  120 Nov 23 23:21 .
drwx------ 9 ec2-user ec2-user  214 Nov 23 23:21 ..
-rw-r--r-- 1 ec2-user ec2-user  393 Nov 23 19:19 authorized_keys
-rw------- 1 ec2-user ec2-user  419 Nov 23 23:07 id_ed25519
-rw-r--r-- 1 ec2-user ec2-user  106 Nov 23 23:10 id_ed25519.pub
-rw------- 1 ec2-user ec2-user 3243 Nov 23 19:42 id_rsa
-rw------- 1 ec2-user ec2-user  750 Nov 23 19:43 id_rsa.pub
-rw------- 1 ec2-user ec2-user 2375 Nov 23 21:02 known_hosts

然后运行详细:

$ ssh -vT [email protected]
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to github.com [140.82.112.4] port 22.
debug1: Connection established.
debug1: identity file /home/ec2-user/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ec2-user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ec2-user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ec2-user/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ec2-user/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ec2-user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/ec2-user/.ssh/id_ed25519 type 4
debug1: key_load_public: No such file or directory

这里似乎存在权限问题,但我不太确定。任何帮助将不胜感激。

相关内容