gpt4 book ai didi

linux - 重用弹性 IP 时出现 AWS Instance SSH 连接问题

转载 作者:太空宇宙 更新时间:2023-11-04 04:38:49 24 4
gpt4 key购买 nike

关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。












想改进这个问题?将问题更新为 on-topic对于堆栈溢出。

4年前关闭。




Improve this question




重建

  • 创建实例
  • 为您创建的实例分配并关联一个新的弹性 IP
  • 通过 ssh 通过寻址您在步骤 2 中与您的实例关联的弹性 IP 连接到实例,以查看您已建立连接没有问题
    $ ssh -i "YouKey.pem"openvpnas@192.168.0.1
  • 与您的实例紧密连接
  • 终止您的实例
  • 创建具有相同堆栈和配置的新实例
  • 关联您在第 2 步中创建的弹性 IP
  • 尝试通过 ssh 连接您在步骤 6 中创建的实例,方法是寻址您在步骤 7 中与新实例关联的弹性 IP
  • 您将收到主机 key 验证失败,例如:
    $ ssh -i "YourKey.pem"openvpnas@192.168.0.1
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
    @警告:远程主机标识已更改! @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
    可能有人在做一些讨厌的事情!
    有人现在可能正在窃听您(中间​​人攻击)!
    主机 key 也可能刚刚更改。
    远程主机发送的 RSA key 的指纹是
    ff:01:ff:01:ff:01:ff:01:ff:01:ff:01:ff:01:ff:01。
    请联系您的系统管理员。
    在 'Path-To-Your-Host-Key'/known_hosts 中添加正确的主机 key 以消除此消息。
    'Path-To-Your-Host-Key'/known_hosts:14 中的违规 RSA key
    192.168.0.1 的 RSA 主机 key 已更改,您已请求严格检查。
    主机 key 验证失败。

  • *FYI: StackOverflowI suppose to post this on server fault as you instructed but I'll leave it as issince it's been a while and it seems people have access to this post.I thought this might be a good example of don't dos??enter image description here

    最佳答案

    原因
    此问题是由与您的旧实例相关联的弹性 IP 冲突引起的。
    在您的 known_hosts 文件中,您的主机地址已与来自主机的指纹相关联。
    您的客户拒绝了您的请求,因为您的新主机为您的客户提供了新的指纹。

    解决方案
    有几种方法可以解决此问题并与您的实例建立连接,如下所示:
    A. 分配一个新的弹性 IP 并将其与您的新实例关联
    要么
    B. 从“known_hosts”文件中删除旧主机 key
    192.168.0.1 ssh-rsa "##################### 你很长(1024 位或更多)的 RSA key 字符串 ######## ###############"

    跟进
    如果您遇到此问题并最终阅读了本文,那么您刚刚了解了身份验证如何与您的 ssh 客户端和 Mac OS X 终端上的实例一起工作。
    当您解决了这个问题并通过 SSH 建立了良好的连接后,现在您了解警告“警告:将 '192.168.0.1' (RSA) 永久添加到已知主机列表”的含义。

    $ ssh -i "YourKey.pem" openvpnas@192.168.0.1
    The authenticity of host '192.168.0.1 (192.168.0.1)' can't be established.
    RSA key fingerprint is ff:01:ff:01:ff:01:ff:01:ff:01:ff:01:ff:01:ff:01.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '192.168.0.1' (RSA) to the list of known hosts.
    Welcome to OpenVPN Access Server Appliance 2.0.25


    The programs included with the Ubuntu system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    ..

    关于linux - 重用弹性 IP 时出现 AWS Instance SSH 连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36298414/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com