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

mac ssh 远程 报错额

  •  
  •   frank1256 · Aug 3, 2022 · 5291 views
    This topic created in 1565 days ago, the information mentioned may be changed or developed.

    啥都没看出来额。。

    (base) zero@ZerodeMacBook-Pro .ssh % ssh zero@localhost -v
    OpenSSH_8.6p1, LibreSSL 2.8.3
    debug1: Reading configuration data /Users/zero/.ssh/config
    debug1: /Users/zero/.ssh/config line 33: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
    debug1: /etc/ssh/ssh_config line 54: Applying options for *
    debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
    debug1: Connecting to localhost port 22.
    debug1: Connection established.
    debug1: identity file /Users/zero/.ssh/id_rsa type 0
    debug1: identity file /Users/zero/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/zero/.ssh/id_dsa type -1
    debug1: identity file /Users/zero/.ssh/id_dsa-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa_sk type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa_sk-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519 type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519_sk type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519_sk-cert type -1
    debug1: identity file /Users/zero/.ssh/id_xmss type -1
    debug1: identity file /Users/zero/.ssh/id_xmss-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.6
    kex_exchange_identification: read: Connection reset by peer
    Connection reset by ::1 port 22
    (base) zero@ZerodeMacBook-Pro 
    
    15 replies  •  2023-09-26 09:15:28 +08:00
    darkengine
    darkengine
    Aug 3, 2022
    1
    debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
    debug1: Connecting to localhost port 22.

    SSH_SK_PROVIDER 没找到,连本机去了啊
    ZeroClover
    ZeroClover
    Aug 3, 2022
    2
    以前遇到过,把 macOS 的 Remote Login 关闭再打开就好了
    wjfz
    wjfz
    Aug 3, 2022
    3
    我上次遇到 kex_exchange_identification 的时候是域名解析错误,所以你看看 /etc/hosts 中是不是没有配置
    127.0.0.1 localhost
    frank1256
    frank1256
    OP
    Aug 3, 2022
    4
    @wjfz 有的
    frank1256
    frank1256
    OP
    Aug 3, 2022
    5
    @darkengine 我就是要连本机测试一下,其他机器来连,一样的错
    frank1256
    frank1256
    OP
    Aug 3, 2022
    6
    @ZeroClover 重开过了
    keenkiller
    keenkiller
    Aug 3, 2022
    7
    你试试用 OpenSSH 生成一个新 key…可能是 ssh 版本和你用的 key 有一些不太兼容。
    kdsland
    kdsland
    Aug 3, 2022
    8
    检查下 config 文件内容有没有错
    xmai
    xmai
    Aug 3, 2022
    9
    您可以尝试使用 `-vvv` ,比如 ssh zero@localhost -vvv ,可以现实更详细的输出。
    frank1256
    frank1256
    OP
    Aug 3, 2022
    10
    @xmai 额,(base) zero@ZerodeMacBook-Pro ~ % ssh root@localhost -vvv
    OpenSSH_8.6p1, LibreSSL 2.8.3
    debug1: Reading configuration data /Users/zero/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
    debug1: /etc/ssh/ssh_config line 54: Applying options for *
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/zero/.ssh/known_hosts'
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/zero/.ssh/known_hosts2'
    debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
    debug1: Connecting to localhost port 22.
    debug1: Connection established.
    debug1: identity file /Users/zero/.ssh/id_rsa type 0
    debug1: identity file /Users/zero/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/zero/.ssh/id_dsa type -1
    debug1: identity file /Users/zero/.ssh/id_dsa-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa_sk type -1
    debug1: identity file /Users/zero/.ssh/id_ecdsa_sk-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519 type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519-cert type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519_sk type -1
    debug1: identity file /Users/zero/.ssh/id_ed25519_sk-cert type -1
    debug1: identity file /Users/zero/.ssh/id_xmss type -1
    debug1: identity file /Users/zero/.ssh/id_xmss-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.6
    kex_exchange_identification: read: Connection reset by peer
    Connection reset by ::1 port 22
    frank1256
    frank1256
    OP
    Aug 3, 2022
    11
    @tairan2006 我不要密钥额,单纯的想输入账号密码登录的
    yaoyaomoe
    yaoyaomoe
    Aug 3, 2022
    12
    看下 hostdeny 和 hostallow 以及防火墙
    可以的话
    试一下
    /usr/sbin/sshd -ddd -p 1022
    ssh -vvv localhost -p1022
    abbottcn
    abbottcn
    Aug 3, 2022 via iPhone
    13
    我之前遇到类似的……
    找到 ssh agent ,干掉之后,就可以了。
    原因不明。

    是否有效,仅供参考。
    leek120303
    leek120303
    Aug 4, 2022
    14
    config 删了重新来呢?
    xbird
    xbird
    Sep 26, 2023
    15
    楼主解决了吗?我也遇到了。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   919 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 19:16 · PVG 03:16 · LAX 11:16 · JFK 14:16
    ♥ Do have faith in what you're doing.