mac ssh 远程 报错额 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
frank1256
V2EX    程序员

mac ssh 远程 报错额

  •  
  •   frank1256 2022-08-03 11:01:25 +08:00 4313 次点击
    这是一个创建于 1172 天前的主题,其中的信息可能已经有所发展或是发生改变。

    啥都没看出来额。。

    (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 条回复    2023-09-26 09:15:28 +08:00
    darkengine
        1
    darkengine  
       2022-08-03 11:33:48 +08:00
    debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
    debug1: Connecting to localhost port 22.

    SSH_SK_PROVIDER 没找到,连本机去了啊
    ZeroClover
        2
    ZeroClover  
       2022-08-03 11:54:37 +08:00
    以前遇到过,把 macOS 的 Remote Login 关闭再打开就好了
        3
    wjfz  
       2022-08-03 12:00:52 +08:00
    我上次遇到 kex_exchange_identification 的时候是域名解析错误,所以你看看 /etc/hosts 中是不是没有配置
    127.0.0.1 localhost
    frank1256
        4
    frank1256  
    OP
       2022-08-03 13:04:17 +08:00
    @wjfz 有的
    frank1256
        5
    frank1256  
    OP
       2022-08-03 13:04:44 +08:00
    @darkengine 我就是要连本机测试一下,其他机器来连,一样的错
    frank1256
        6
    frank1256  
    OP
       2022-08-03 13:05:15 +08:00
    @ZeroClover 重开过了
    tairan2006
        7
    tairan2006  
       2022-08-03 13:22:14 +08:00
    你试试用 OpenSSH 生成一个新 key…可能是 ssh 版本和你用的 key 有一些不太兼容。
    kdsland
        8
    kdsland  
       2022-08-03 13:39:39 +08:00
    检查下 config 文件内容有没有错
    xmai
        9
    xmai  
       2022-08-03 14:04:03 +08:00
    您可以尝试使用 `-vvv` ,比如 ssh zero@localhost -vvv ,可以现实更详细的输出。
    frank1256
        10
    frank1256  
    OP
       2022-08-03 15:02:49 +08:00
    @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
        11
    frank1256  
    OP
       2022-08-03 15:03:16 +08:00
    @tairan2006 我不要密钥额,单纯的想输入账号密码登录的
    yaoyaomoe
        12
    yaoyaomoe  
       2022-08-03 19:04:15 +08:00
    看下 hostdeny 和 hostallow 以及防火墙
    可以的话
    试一下
    /usr/sbin/sshd -ddd -p 1022
    ssh -vvv localhost -p1022
    abbottcn
        13
    abbottcn  
       2022-08-03 19:47:05 +08:00 via iPhone
    我之前遇到类似的……
    找到 ssh agent ,干掉之后,就可以了。
    原因不明。

    是否有效,仅供参考。
    leek120303
        14
    leek120303  
       2022-08-04 15:25:00 +08:00
    config 删了重新来呢?
    xbird
        15
    xbird  
       2023-09-26 09:15:28 +08:00
    楼主解决了吗?我也遇到了。。。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1164 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 17:57 PVG 01:57 LAX 10:57 JFK 13:57
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86