我正在尝试使用SSH连接到AWS服务器。但由于某种原因,我不能。当我跑到下面时:
ssh -i <keypair.pem> ec2-user@<ip> -vvv
我明白了:
OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "<ip>" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to <ip> [<ip>] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file <keypair.pem> type -1
debug1: key_load_public: No such file or directory
debug1: identity file <keypair.pem>-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4
我猜这是路由器ip禁止配置问题?我该怎么办?
答案 0 :(得分:1)
检查远程.ssh目录的权限和内容。在authorized_keys文件中有你的公钥吗?请参阅以下链接