请教一个 ssh 问题

2021-11-08 18:47:43 +08:00
 bigwhite2021

机器为 M1 Macbook air ,操作系统为 macOs Big Sur 11.6 。 今天机器突然不能被 ssh 登陆了,提示

ssh_exchange_identification: Connection closed by remote host

机器的 system.log 为

(com.openssh.sshd.86030324-DFE4-4A3F-B3A2-2E56573A7B8A[3627]): Service exited with abnormal code: 255

重启 ssh 服务报错

(com.apple.xpc.launchd.domain.system): entering bootstrap mode
(com.openssh.sshd): Unknown key for string: SHAuthorizationRight
(com.apple.xpc.launchd.domain.system): exiting bootstrap mode

Google 查了半天,没找到解决办法,请教一下各位 v 友有没有碰到类似的情况

1262 次点击
所在节点    程序员
5 条回复
zpfhbyx
2021-11-08 19:10:31 +08:00
关下全局?
TomChaai
2021-11-08 19:13:10 +08:00
这个我猜你找到 sshd 相关的 plist 文件,把里面 SHAuthorizationRight 对应的 key 拿出来看看是什么样的才能知道,你的电脑长什么样我们是看不到的,要你自己去找
bigwhite2021
2021-11-08 19:48:49 +08:00
找到原因了,昨晚配置腾讯云的时候老是断开连接,就配置了
```
ServerAliveInterval 30
ServerAliveCountMax 60
```
这两个参数,把这个两个参数注释了就行了
bigwhite2021
2021-11-08 19:50:37 +08:00
@bigwhite2021 但是没找到为什么这两个参数会有影响
bigwhite2021
2021-11-08 19:51:31 +08:00
@TomChaai 跟 SHAuthorizationRight 这个报错没关系,现在可以了还是会报

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/813957

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX