(base)x xxx@xxxMacBook-ProD > /usr/local/bin > expect /usr/local/bin/login/login-jumper.exp spawn ssh -p 2xxxxxx Unable to negotiate with 106.75.36.157 port 22222: no matching host key type found. Their offer: ssh-rsa spawn_id: spawn id exp6 not open while executing "interact" (file "/usr/local/bin/login/login-jumper.exp" line 29)
原因
openssh觉得ssh-rsa加密方式不安全, 直接从8.8开始默认不允许这种密钥用于登陆了
解决方案
方案1: 临时性方案(命令行增加参数 -oHostKeyAlgorithms=+ssh-rsa)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$ ssh -oHostkeyALgorithms=+ssh-rsa -p 22222 -l The authenticity of host '[baolei.zen-game.com]:22222 ([106.75.36.157]:22222)' can't be established. RSA key fingerprint is SHA256:2wywU82+91MJq5vxjwWWOIpTNdVal2GYAOi35/FWm4. This host key is known by the following other names/addresses: ~/.ssh/known_hosts:16: [zengame.uhasadmin.com]: 22222 Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added "[baolei.zen-game.com]:22222 (RSA) to the list of known hosts. Password authentication (mars.cai@baolei.zen-game.com) Password: Welcome to SSHD 请选择多因子认证方式: [1] 短信验证码 [2] 手机令牌OTP [x] English [e] 退出