【问题标题】:SSH into an Openstack instance - ErrorSSH 进入 Openstack 实例 - 错误
【发布时间】:2013-05-21 11:59:14
【问题描述】:

我尝试使用 ssh 登录为该课程构建的 Openstack 服务器。我从服务器下载 .pem 密钥。通过 putty,我使用 .ppk 密钥成功登录(使用 putty keygen 通过 .pem 生成 .ppk 密钥)。但它不适用于 ssh。有什么我错过的吗?

我的命令

ssh -l ubuntu -i ~/.ssh/xxx.pem xxx.edu -p 18922

错误信息

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
(xxx).
Please contact your system administrator.
Add correct host key in /Users/xxx/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/xxx/.ssh/known_hosts:2
RSA host key for [xxx.edu]:18922 has changed and you have requested strict checking.
Host key verification failed.

【问题讨论】:

  • 你在用什么ssh?我猜是openssh,我不相信它支持.pem 格式键...
  • 我使用 OSX 的默认 ssh。那么如何使用私钥登录呢?
  • 您需要找到一种方法将.pem 格式化的密钥转换为ssh 可以理解的格式。 ssh-keygen 可能能够做到这一点,或者来自 openssl 套件的东西。我没有一个具体的解决方案。也许其他人会。
  • 你可以尝试在从 /Users/xxx/.ssh/known_hosts 文件中删除第二个密钥之后。我认为它会解决这个错误。
  • @AnilVishnoi 非常感谢。它有效。

标签: linux ubuntu ssh openstack


【解决方案1】:

感谢 Anil Vishnoi 的评论!

删除

/Users/xxx/.ssh/known_hosts

并通过传递 pem 键使用我原来的命令

ssh -l ubuntu -i ~/.ssh/xxx.pem xxx.edu -p 18922

我可以直接 ssh 到 Openstack 服务器。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-21
    相关资源
    最近更新 更多