升级前好好的,升级后,ssh 密钥就无法连接之前的服务器了,搜索了一下发现升级后会改变密钥
1
lcdtyph 2021-06-11 13:07:14 +08:00 via iPhone
??建议你重新搜索
从来没听说哪个系统升级会动~/.ssh 的 |
2
MrCurly 2021-06-11 13:08:44 +08:00
不可能。。你看看是不是权限变了
|
3
doveyoung 2021-06-11 13:52:13 +08:00
是不是换用户了。。。。或者是权限不对,连不上的报错信息是什么
ssh -v [user]@[ip] -p 22 -i [key] |
4
Tink 2021-06-11 14:20:52 +08:00 via Android
错误提示是什么
|
5
herozzm OP @doveyoung
@Tink 我重新生成密钥,公钥丢服务器上了,但是还是无法连接,windows 客户端正常,唯独 mac 不行,-v 的提示好像没有什么有意义的内容,最后一句是 client_loop: send disconnect: Broken pip 命令:ssh root@ip 地址 -p 6800 -v -i .ssh/id_rsa 提示: OpenSSH_8.1p1, LibreSSL 2.7.3 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 47: Applying options for * debug1: Connecting to ... debug1: Connection established. debug1: identity file .ssh/id_rsa type 0 debug1: identity file .ssh/id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2 debug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000 debug1: Authenticating to ... as 'root' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:eqhZjfKBNpHc23rSU6SXJpmIVxCmcsDPUF8DXhJlgrw debug1: Host ... is known and matches the ECDSA host key. debug1: Found key in /Users/hero/.ssh/known_hosts:1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: Will attempt key: .ssh/id_rsa RSA SHA256:VNpcJvlrgTcYGbyKY35kp/e/u2/T0XrEiEBA+b0e+WE explicit debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: .ssh/id_rsa RSA SHA256:VNpcJvlrgTcYGbyKY35kp/e/u2/T0XrEiEBA+b0e+WE explicit debug1: Server accepts key: .ssh/id_rsa RSA SHA256:VNpcJvlrgTcYGbyKY35kp/e/u2/T0XrEiEBA+b0e+WE explicit debug1: Authentication succeeded (publickey). Authenticated to ....). debug1: channel 0: new [client-session] debug1: Requesting [email protected] debug1: Entering interactive session. debug1: pledge: network debug1: client_input_global_request: rtype [email protected] want_reply 0 debug1: Remote: /root/.ssh/authorized_keys:3: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug1: Remote: /root/.ssh/authorized_keys:3: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug1: Sending environment. debug1: Sending env LC_TERMINAL_VERSION = 3.4.7beta2 debug1: Sending env LANG = zh_CN.UTF-8 debug1: Sending env LC_TERMINAL = iTerm2 client_loop: send disconnect: Broken pip |
6
thunderw 2021-06-11 15:48:33 +08:00
明明是都已经 Authentication succeeded (publickey) 了。后面被踢掉估计是别的原因了。
我 big sur 登 ssh 好好的啊。 |
7
thunderw 2021-06-11 15:57:27 +08:00
有人说 /etc/ssh/ssh_config 里加这一句可以搞定。估计是新版和你的服务器有啥不兼容的情况
Host * IPQoS=throughput |