账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    多个服务器组之间如何配置不同的SSH key
    31
    0

    跳板机只有一个 两个服务器群组 一个组用key1 跳板机无密码登录一直没问题 加入组2服务器后使用另外一个key2 现在必须使用ssh -i keyfile user@ip登录

    update 2019年4月11日
    一个“取巧”的方法 来自stackoverflow
    ~/.ssh/config开头添加N行IdentityFile ~/.ssh/{key_filename}比如

    IdentityFile ~/.ssh/id_rsa
    IdentityFile ~/.ssh/id_rsa_old
    IdentityFile ~/.ssh/id_ed25519

    ssh 将如下

    debug1: Trying private key: /home/example/.ssh/id_rsa
    debug1: read PEM private key done: type RSA
    debug1: Authentications that can continue: publickey
    debug1: Trying private key: /home/example/.ssh/id_rsa_old
    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 10 元积分
        全部回答
    • 0
    • 一只鹿ii 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部