• 请不要在回答技术问题时复制粘贴 AI 生成的内容
bigwhite2021
V2EX  ›  程序员

请教一个 ssh 问题

  •  
  •   bigwhite2021 · Nov 8, 2021 · 1681 views
    This topic created in 1644 days ago, the information mentioned may be changed or developed.

    机器为 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 友有没有碰到类似的情况

    5 replies    2021-11-08 19:51:31 +08:00
    justseemore
        1
    justseemore  
       Nov 8, 2021
    关下全局?
    TomChaai
        2
    TomChaai  
       Nov 8, 2021
    这个我猜你找到 sshd 相关的 plist 文件,把里面 SHAuthorizationRight 对应的 key 拿出来看看是什么样的才能知道,你的电脑长什么样我们是看不到的,要你自己去找
    bigwhite2021
        3
    bigwhite2021  
    OP
       Nov 8, 2021
    找到原因了,昨晚配置腾讯云的时候老是断开连接,就配置了
    ```
    ServerAliveInterval 30
    ServerAliveCountMax 60
    ```
    这两个参数,把这个两个参数注释了就行了
    bigwhite2021
        4
    bigwhite2021  
    OP
       Nov 8, 2021
    @bigwhite2021 但是没找到为什么这两个参数会有影响
    bigwhite2021
        5
    bigwhite2021  
    OP
       Nov 8, 2021
    @TomChaai 跟 SHAuthorizationRight 这个报错没关系,现在可以了还是会报
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1346 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 17:10 · PVG 01:10 · LAX 10:10 · JFK 13:10
    ♥ Do have faith in what you're doing.