AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 703742
Accepted
Ashish Karpe
Ashish Karpe
Asked: 2015-07-07 02:04:51 +0800 CST2015-07-07 02:04:51 +0800 CST 2015-07-07 02:04:51 +0800 CST

连接已建立。仍然是 Ubuntu ec2 实例的 ssh 登录问题

  • 772

我无法登录到我的服务器(ec2 实例)。在此之前,我能够登录。没有对服务器或安全组进行任何更改!这个问题来自aws方面吗?是否突然发生有时您无法连接到您的 ec2 实例并需要重新启动,或者这是一个安全漏洞,因为有人可能会篡改我在服务器上的密钥?

ashish@ashishk:~/MyScripts$ ./test.ssh 

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to test.ige.com [ipxxxxx] port 22.
debug1: Connection established.
debug1: identity file /home/ashish/Keys/igepune.pem type -1
debug1: identity file /home/ashish/Keys/igepune.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2

我的登录脚本:

ashish@ashishk:~/MyScripts$ cat ./test.ssh 
ssh ubunt@ipxxxxx -v -i ~/Keys/igepune.pem 

输出-vvv:

ashish@ashishk:~/MyScripts$ ./test.ssh 

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to test.ige.com [ipxxxx] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/ashish/Keys/igepune.pem" as a RSA1 public key
debug1: identity file /home/ashish/Keys/igepune.pem type -1
debug1: identity file /home/ashish/Keys/igepune.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2

**ashish@ashishk:~/MyScripts$ ll /home/ashish/Keys/igepune.pem**

-r-------- 1 ashish ashish 1679 Apr 21 18:56 /home/ashish/Keys/igepune.pem

我怀疑亚马逊是否会在一段时间后过期 pem 密钥?

ubuntu
  • 3 3 个回答
  • 1628 Views

3 个回答

  • Voted
  1. Best Answer
    Andrii Kupchanko
    2015-07-07T02:50:17+08:002015-07-07T02:50:17+08:00

    从您的调试输出中:

    debug1: identity file /home/ashish/Keys/igepune.pem type -1
    debug1: identity file /home/ashish/Keys/igepune.pem-cert type -1
    

    “身份文件”行末尾的“-1”表示您的 SSH 客户端找不到要使用的文件。

    此外,您可以使用 -vvvv 来代替 ssh 的 -v 参数,使其更详细

    • 3
  2. Ketan Patel
    2015-07-07T04:45:43+08:002015-07-07T04:45:43+08:00

    实际上,您可能需要仔细检查要连接的服务器的 IP 地址。如果您使用弹性 IP 重启 AWS EC2 实例,公共 IP 地址会更改,因此您可能无法登录。

    要查看的另一件事是您的IP地址是否已更改。如果您设置了安全规则来限制对您的 IP 地址的访问,那么如果您的 IP 地址发生更改,您将无法登录。

    • 1
  3. Ashish Karpe
    2015-07-09T22:43:03+08:002015-07-09T22:43:03+08:00

    重启后我可以 ssh 到服务器!

    这是因为这个 i/o 问题!这是亚马逊的 ec2 问题,所以有时会出现 i/o 问题,因此找不到服务器上的密钥!只需重新启动即可解决问题!

    感谢大家的帮助!

    • 0

相关问题

  • 无法通过 Ubuntu VPN 访问外部网络

  • ubuntu apt-get upgrade - 如何在 shell 中单击确定?

  • VirtualBox 上 Ubuntu 的访客优化技巧 [关闭]

  • 外部硬盘上的 virtualbox 虚拟硬盘驱动器(Vista 主机上的 ubuntu 客户机)

  • 如何在 Ubuntu 上挂载 LVM 分区?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve