远程 `mac` 拒绝本地计算机的 ssh 连接

远程 `mac` 拒绝本地计算机的 ssh 连接

这个问题让我很困惑。我做了以下事情:

  1. 打开remote路由器端口转发。

:当我在电脑ssh *@***上输入时localremote路由器日志显示

[远程 LAN 访问] 从*.*.*.*:37482 到 192.168.0.16:22

*.*.*.*local电脑 ip

  1. remote login在远程打开Mac

但我无法通过 ssh 进入remote mac计算机。

local计算机中显示

OpenSSH_6.8p1, OpenSSL 1.0.2a 19 Mar 2015
debug1: Connecting to `*.*.*.*` [remote mac] port 22.
debug1: Connection established.
debug1: identity file /home/AAA/.ssh/id_rsa type 1
debug1: identity file /home/AAA/.ssh/id_rsa-cert type -1
debug1: identity file /home/AAA/.ssh/id_dsa type -1
debug1: identity file /home/AAA/.ssh/id_dsa-cert type -1
debug1: identity file /home/AAA/.ssh/id_ecdsa type -1
debug1: identity file /home/AAA/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/AAA/.ssh/id_ed25519 type -1
debug1: identity file /home/AAA/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.8
ssh_exchange_identification: Connection closed by remote host

remoteMac 电脑上,我查看了系统日志。它显示

Jan 15 19:10:57 AAA com.apple.xpc.launchd[1] (com.openssh.sshd.BBBBB-BBBB): Service instances do not support events yet.
Jan 15 19:10:57 AAA.local sshd[3539]: error: BSM audit: getaddrinfo failed for UNKNOWN: nodename nor servname provided, or not known
Jan 15 19:10:57 AAA.local sshd[3539]: Could not write ident string to UNKNOWN
Jan 15 19:10:57 AAA com.apple.xpc.launchd[1] (com.openssh.sshd.BBBBB-BBBB[3539]): Service exited with abnormal code: 255

相关内容