Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

namu777

macrumors newbie
Original poster
Jan 6, 2014
3
0
Hello, I am on a mac book pro running Mavericks. I am unable to remotely connect using ssh. In System Preferences > Sharing, I have Remote Login On and Allow access for all users. In System Preferences > Security & Privacy > Firewall, Block all incoming connections is unchecked.

When I try to ssh into my computer remotely, I get:
Code:
$ ssh -vvv namu@10.101.152.154
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.101.152.154 [10.101.152.154] port 22.
debug1: connect to address 10.101.152.154 port 22: Connection timed out
ssh: connect to host 10.101.152.154 port 22: Connection timed out

I am able to ping my computer just fine
Code:
$ ping 10.101.152.154
PING 10.101.152.154 (10.101.152.154) 56(84) bytes of data.
64 bytes from 10.101.152.154: icmp_seq=1 ttl=59 time=1.66 ms
64 bytes from 10.101.152.154: icmp_seq=2 ttl=59 time=59.0 ms
64 bytes from 10.101.152.154: icmp_seq=3 ttl=59 time=83.4 ms
^C
--- 10.101.152.154 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2779ms
rtt min/avg/max/mdev = 1.665/48.052/83.435/34.277 ms

Traceroute gave me a strange output when ran from the remote host
Code:
$traceroute 10.101.152.154
traceroute to 10.101.152.154 (10.101.152.154), 30 hops max, 60 byte packets
 1  165.124.130.1 (165.124.130.1)  0.395 ms  0.394 ms  0.386 ms
 2  2020rdg-idf-1-vln-1140.northwestern.edu (129.105.46.194)  1.074 ms  1.188 ms  0.835 ms
 3  2020rdg-4-prt-252.northwestern.edu (129.105.247.80)  1.051 ms  0.886 ms  1.154 ms
 4  lev-9-vln-2028.northwestern.edu (129.105.247.75)  0.780 ms  0.894 ms  1.272 ms
 5  * * *
 6  * * *
 7  * * *
 8  * * *
... (more *** here)
24  * * *
25  * * *
26  *^C
and when ran from my mac I got the following:
Code:
$ traceroute 10.101.152.154
traceroute to 10.101.152.154 (10.101.152.154), 64 hops max, 52 byte packets
 1  10.101.152.154 (10.101.152.154)  0.365 ms  0.155 ms  0.088 ms

I tried for hours to set up a remote connection unsuccessfully. Can someone please help? Thank you.
 
Well just for sanity checking, do you have physical access to the machine you are trying to ssh to?

If you do open terminal and ssh to yourself:

ssh -vvv namu@localhost

At least it's a start and can narrow down your problem. But I suspect something is blocking port 22 along the way. You can also run sshd on a different port.
 
Well just for sanity checking, do you have physical access to the machine you are trying to ssh to?

If you do open terminal and ssh to yourself:

ssh -vvv namu@localhost

At least it's a start and can narrow down your problem.

I can ssh into my own computer just fine.

Code:
$ ssh -vvv namu@localhost
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 102: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: identity file /Users/namu/.ssh/id_rsa type -1
debug1: identity file /Users/namu/.ssh/id_rsa-cert type -1
debug1: identity file /Users/namu/.ssh/id_dsa type -1
debug1: identity file /Users/namu/.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.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug2: fd 5 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "localhost" from file "/Users/namu/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /Users/namu/.ssh/known_hosts:2
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: 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
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
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: 125/256
debug2: bits set: 538/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 0f:b9:12:2d:11:14:e7:db:8b:76:68:8d:ca:e5:3f:96
debug3: load_hostkeys: loading entries for host "localhost" from file "/Users/namu/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /Users/namu/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys
debug1: Host 'localhost' is known and matches the RSA host key.
debug1: Found key in /Users/namu/.ssh/known_hosts:2
debug2: bits set: 489/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
debug2: key: /Users/namu/.ssh/id_rsa (0x0),
debug2: key: /Users/namu/.ssh/id_dsa (0x0),
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: start over, passed a different list publickey,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/namu/.ssh/id_rsa
debug3: no such identity: /Users/namu/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /Users/namu/.ssh/id_dsa
debug3: no such identity: /Users/namu/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
debug3: packet_send2: adding 32 (len 23 padlen 9 extra_pad 64)
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug3: packet_send2: adding 48 (len 6 padlen 10 extra_pad 64)
debug1: Authentication succeeded (keyboard-interactive).
Authenticated to localhost ([::1]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug2: callback start
debug2: fd 5 setting TCP_NODELAY
debug3: packet_set_tos: set IPV6_TCLASS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug3: Ignored env TERM_PROGRAM
debug3: Ignored env SHELL
debug3: Ignored env TERM
debug3: Ignored env TMPDIR
debug3: Ignored env Apple_PubSub_Socket_Render
debug3: Ignored env TERM_PROGRAM_VERSION
debug3: Ignored env TERM_SESSION_ID
debug3: Ignored env USER
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env __CF_USER_TEXT_ENCODING
debug3: Ignored env PATH
debug3: Ignored env __CHECKFIX1436934
debug3: Ignored env PWD
debug3: Ignored env DBUS_LAUNCHD_SESSION_BUS_SOCKET
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: Ignored env SHLVL
debug3: Ignored env HOME
debug3: Ignored env LOGNAME
debug3: Ignored env DISPLAY
debug3: Ignored env SECURITYSESSIONID
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Last login: Mon Jan  6 23:21:11 2014
 
I can ssh into my own computer just fine.

You may need to talk to your IT guy at work :) Are you doing this over a LAN, VPN, or one public IP to another in the cloud?

My assumption is there is a firewall blocking that port in stealthed mode - stealthed mode assumed because of the timeout otherwise you'd see 'connection refused'. Another security tactic so people can port scan networks.
 
IP addresses in the 10.x.x.x range are non-routable which means that those addresses don't go across the internet. You will never be able to remotely access that computer without configuration on the router to forward ports, and it's my guess that this isn't an option in your environment.
 
You sure you're going to the right network?

Like chrfr said:
172.16.xxx.xxx - 172.31.xxx.xxx
10.xxx.xxx.xxx
192.168.xxx.xxx
...are all "private" IP addresses, used "behind" routers / gateway to share a public IP address (NAT).

This can lead to some confusion:

If you're on a 10.xxx.xxx.xxx network at the office, behind a NAT router, and you're trying to reach another 10.xxx.xxx.xxx computer at home, also behind the NAT router, then you won't reach it.
Even worse, you may think you can reach it as it might seem to respond to a "ping", but in fact you're "pinging" to another machine in your network at the office with the same "private" 10.xxx.xx.xxx address as the computer at home.

What you need is that, from your office, you can reach (via SSH) your "public" IP address, and the NAT router at home will forward that connection (SSH) to the correct IP (10.xxx.xxx.xxx) inside your home.

Mind you, many network admins block "outgoing" SSH...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.