Mac Yosemite中的Ssh / Ping问题通过wifi而不是以太网


1

我正在使用Mac Yosemite OS通过ssh连接到我的办公室服务器。我无法连接任何Wifi(我的apt的wifi或我的工作场所的wifi)。但是,当我通过以太网连接时,我能够做ssh。我做了以下事情来解决问题,但我没有成功。

  1. 切断我的防火墙,但我仍然无法连接。
  2. 我抓住了我的服务器而且我得到了 Request timeout 状态。然而,当我通过我的另一个ping或ssh时 Mac(拥有Maverick OS) ,我能得到我的ping消息的积极响应并连接(如果有任何wifi)。

  3. 我做了ssh -vvv username @ host,我收到了以下消息

    OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
    debug1: Reading configuration data /etc/ssh_config
    debug1: /etc/ssh_config line 20: Applying options for *
    debug1: /etc/ssh_config line 100: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to <server name> [<server ip address>] port 22.
    debug1: connect to address <server ip address> port 22: Operation timed out 
    ssh: connect to host <server name> port 22: Operation timed out
    
  4. 我重新安装了OpenSSL,仍然无法解决问题。

  5. 当我使用Cyber​​duck,Firezilla或VNC时,我遇到了类似的问题,但是我的其他计算机没有OS Maverick。

你有任何我应该尝试的想法或建议吗?谢谢!

******更新1 *******

我删除了OpenSSL&amp; brew并尝试连接到服务器。我做到了

ssh -vvv uname@<server-name>

消息说连接已建立。但是,在以下消息之后,我无法继续前进:

debug1: SSH2_MSG_SERVICE_ACCEPT received

这是完整的信息:

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 100: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to <server name> [<ip address>] port 22.
debug1: Connection established.
debug1: identity file /Users/snape/.ssh/id_rsa type -1
debug1: identity file /Users/snape/.ssh/id_rsa-cert type -1
debug1: identity file /Users/snape/.ssh/id_dsa type -1
debug1: identity file /Users/snape/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH*
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "dna.nri.bcm.edu" from file "/Users/aayushraman/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /Users/aayushraman/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: found hmac-md5-etm@openssh.com
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug2: mac_setup: found hmac-md5-etm@openssh.com
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 127/256
debug2: bits set: 504/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 59:d3:ec:27:16:df:01:04:8a:7a:92:34:3f:91:16:8d
debug3: load_hostkeys: loading entries for host "dna.nri.bcm.edu" from file "/Users/snape/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /Users/snape/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "10.34.48.30" from file "/Users/snape/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /Users/snape/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug1: Host '<server name>' is known and matches the RSA host key.
debug1: Found key in /Users/snape/.ssh/known_hosts:1
debug2: bits set: 513/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received

此外,当我尝试ping时,我能够做到并且能够接收消息而不是错误!

我认为我非常接近解决方案,并且肯定brew在我的mac yosemite上无法正常工作。

********更新2 **********

我能够通过以下方式解决问题:

  1. 去除酿造
  2. 基本上将UseDNS的参数设为no

    vi / etc / sshd_config UseDNS没有

  3. 服务sshd重新启动

    取消设置SSH_AUTH_SOCK

然后做ssh


traceroute主机告诉你什么?你说你在端口22上的imp ping和tcp都有超时。这表明存在连接问题。只连接到wifi时可以使用互联网吗?
Paul

嗨@Paul - 我运行了traceroute&lt;服务器名称&gt;我没有收到任何错误消息。它跑了64跳,显示收到了数据包。我试过通过我的公寓的wifi和以太网电缆使用互联网。我不知道为什么我的Yosemite在我的Mac上有连接问题,但其他一个工作正常。
snape

Answers:


0

我能够通过以下方式解决问题:

  1. 去除酿造
  2. 基本上将UseDNS的参数设为no

    vi / etc / sshd_config UseDNS没有

  3. 服务sshd重新启动

    取消设置SSH_AUTH_SOCK

  4. 然后做ssh

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.