I have set up the Raspberry Pi to work fine with Raspbian on Wi-Fi, etc., but when I would try to connect after a reset the IP address would change. Then I spent all this time changing the configurations to get a static IP address, and now that it is static, all of a sudden I cannot connect to the Raspberry Pi.

I have no external monitor, so everything has been done headless, but now I cannot connect even over eth0 (even if I ping the address that I get with arp -a, the connection gives timeout). What is the issue? (I am using OS X).

Here is the last attempt, and I also tried diff port.

ssh [email protected] -vvv
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 [] port 22.
debug1: connect to address port 22: Operation timed out
ssh: connect to host port 22: Operation timed out
$ ssh [email protected] -p 80
ssh: connect to host port 80: Operation timed out

This is wpa_supplicant file

ctrl_interface=DIR=/var/wpa_supplicant Group=netdev

        ssid="my network"

interfaces file

auto lo
iface lo inet loopback
iface etho0 inet dhcp

allow-hotplug wlan0

iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp
  • Unless you tell us what you did we can't help either. Setting a static address is almost always the WRONG thing to do. If you want it not to change, you are usually better reserving an IP on your router. Even better install netatalk on the Pi and connect from OS X to `raspberrypi.local'
    – Milliways
    Feb 22, 2015 at 22:58
  • only thing that I changed was the wpa_sup file and wrote -iface wlan0 inet static- whereas it used to say auto and read from another config file. All I am trying to figure out is how to get SSH capability back on eth0 so I can figure out what is acting up. As it is now I cannot access the pi at all Feb 23, 2015 at 7:17
  • If you have anything other than iface wlan0 inet manual wpa_supplicant won't do anything. If you have broken this and can't get into the system remove the WIfi adapter, and use Ethernet. NOTE you still haven't provided any information about your configuration (physical or configuration). The "only thing that I changed" comment is usually an indication that the questioner can't or won't supply the needed information to help solve the problem.
    – Milliways
    Feb 23, 2015 at 10:58
  • yes, as I don't know what info you want me to post/what info would be helpful. iface wlan0 inet manual <= this was changed to static similar to this raspberrypi.org/forums/viewtopic.php?f=28&t=63754 . I tried with the wifi dongle off and it seemed to not change anything, as the pi won't show up using the arp -a command even when it is connected only via ethernet. Outside of that, I don't know what else was changed, I manually put an ip / gateway etc. vs the wlan0 auto. I also followed this guide weworkweplay.com/play/… Feb 24, 2015 at 7:19
  • The link you quoted states "Start by booting the Raspberry Pi, connected to a display and a keyboard" but you have told us you don't have these. If you had actually followed this guide it would have worked. It also states "Change iface wlan0 inet dhcp into iface wlan0 inet static". Which is not normal (I still think static addresses are misguided). If you can't post the contents of /etc/network/interfaces and wpa_supplicant.conf we can't help you.
    – Milliways
    Feb 24, 2015 at 7:42

2 Answers 2


Your interfaces file states:

iface etho0 inet dhcp

which is obviously wrong. It should be eth0. And are you sure dhcp is active otherwise the interface will not get an IP address.

Issue the ifconfig command to find out if there's an IP address used by the interface.

  • sorry that was a typo. its eth0 ...how do i find out if dhcp is active on the pi? the inet address for eth0, lo, and wlan0 are each unqiue, the issue is that wlan0 keeps changing every time the pi turns off, so is very hard to find it until i connect with ethernet. I signed up with no-ip and got that working but I cannot figure out if the reason i cannot connect is still due to the port fowarding issue Mar 1, 2015 at 5:31
  • Issue ifconfig and paste the output here please.
    – wie5Ooma
    Mar 1, 2015 at 22:39

As I stated in my original comment, if you want the IP address not to change, you are usually better reserving an IP address on your router.

Setting a static address is a brute-force solution, which won't always work. If you go to a network with a different range (mine is 10.1.1.x) it won't work, and even if it uses the same may conflict with other devices.

You would be better to install netatalk on the Raspberry Pi and let OS X discover the IP address. Connect from OS X to `raspberrypi.local'.

NOTE: You still should have iface wlan0 inet manual, and if you are going to use id_str="home", you need iface home inet dhcp.

  • wow that nettalk is awesome. the only issue is I do not have access to the router in order to edit ports etc. do you know of a way I can do it through the pi itself? Mar 1, 2015 at 4:37
  • raspberrypi.org/forums/viewtopic.php?f=91&t=22660 is doing this ok where he sets it to static? the I was able to access the router but it asks for an ip (in my case is constantly changing) so im not sure how to open a port for that case. any idea? Mar 1, 2015 at 6:13

Your Answer

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

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