2

I've done some googling, and I can't find any answers to my problem: I can't ssh into my Raspberry Pi from my computer (connection timeout), but I can ssh into my web server (dreamhost) and then ssh from there into my Pi. What could be causing this? How do I solve it? I even just reinstalled Raspbian and with a clean install this happens.

Edit (updates): Running Mac OS X 10.9.4

Ping from my computer:

PING ----- (50.30.xxx.xxx): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
Request timeout for icmp_seq 0
ping: sendto: Host is down
Request timeout for icmp_seq 1
ping: sendto: Host is down
Request timeout for icmp_seq 2
ping: sendto: Host is down
Request timeout for icmp_seq 3
--- ----- ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss

Ping from within Dreamhost:

PING ----- (50.30.xxx.xxx) 56(84) bytes of data.
64 bytes from 50.30.xxx.xxx: icmp_req=1 ttl=51 time=21.8 ms
64 bytes from 50.30.xxx.xxx: icmp_req=2 ttl=51 time=21.9 ms

--- ----- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 28177ms
rtt min/avg/max/mdev = 21.893/21.916/21.940/0.149 ms

I'm not using any sort of port forwarding, my apartment complex gives each device a unique public IP.

Route:

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            50.30.232.1        UGSc           26        0     en1
50.30.232/22       link#5             UCS             4        0     en1
50.30.232.1        0:10:f3:30:25:e7   UHLWIir        27        0     en1   1199
50.30.233.135      50:ea:d6:3:cc:13   UHLWI           0        0     en1   1140
50.30.233.xxx      localhost          UHS             0        2     lo0
50.30.234.120      6c:f0:49:ef:a2:fc  UHLWIi          1        0     en1   1098
50.30.235.255      ff:ff:ff:ff:ff:ff  UHLWbI          0       29     en1
127                localhost          UCS             0        0     lo0
localhost          localhost          UH              8   832546     lo0
169.254            link#5             UCS             0        0     en1
9
  • 1
    Can you ping the Pi from your computer? Is the computer Windows/Mac/Linux etc? How are your computer and Pi connected?
    – joan
    Jul 4, 2014 at 7:15
  • related? Jul 4, 2014 at 11:25
  • 1
    You are probably using port forwarding, right?
    – Gerben
    Jul 4, 2014 at 12:45
  • I'm not using port forwarding, and see edits for pings
    – Eric Wolf
    Jul 4, 2014 at 15:48
  • Will you please post the output of route? (Specifically from your home computer). Does your pi and home computer share a LAN?
    – earthmeLon
    Jul 5, 2014 at 1:39

3 Answers 3

1

Many network infrastructures that support public machines are configured to not allow 'peer' connections. This way, when a windows machine gets infected, that machine can not contact any other machine on the local network (your neighbors) and crap up their machines too. I believe that your case is by design..

1
  • Unless the complex updated the network recently (unlikely), I haven't had this problem in the past (5-6 weeks ago). Are there any other reasons this could happen?
    – Eric Wolf
    Jul 8, 2014 at 3:51
1

I had something similar: ping raspi worked fine, but ssh pi@raspi did not, from my Windows desktop, while it was working fine the day before. From another Raspberry it acted the same. Reinstalled, searched all over the fora, nothing.

Then I found the problem: I had made a hosts file entry because the raspi hostname was not always resolved correctly: 192.168.0.19 raspi. But then my modem decided to assign this particular ip address to my desktop after a reboot and ping raspi was just answered by the desktop, while it refused ssh connections!

Solved it by removing the raspi entry from the desktop's hosts file and empty out the .ssh/known_hosts.

1
0

Are all your interfaces up and running? Are you trying to ssh (wireless) or via LAN cable. If you are doing via the LAN, then your eth0 should be up, and configured as for example:

sudo ifconfig eth0 192.168.0.1

for Mac, view the analogous command, and then try sshing into your raspberry pi.

Also, you could view the raspberry pi's interfaces settings and see if something is out of place. You could post the interfaces file here for us to figure out, perhaps?

In RPi, the n/w interfaces file is located in

nano /etc/network/interfaces
3
  • I think you missed the point where everything works, I can ssh just fine from my mac into my web server, and can ssh from my web server to the pi, but not from my mac to the pi
    – Eric Wolf
    Jul 6, 2014 at 18:50
  • try sudo ssh when trying to ssh from mac into pi, it used to work for me when it would take a lot of time(too long). (It could be a bad suggestion) Jul 6, 2014 at 19:32
  • it could be something about the n/w architecture, you cannot ping from local n/w (lan) to a public ip n/w(upper). Jul 6, 2014 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.