I've installed isc-dhcp-server and followed all the instructions for setting up an encrypted ad-hoc network as per http://lcdev.dk/2012/11/18/raspberry-pi-tutorial-connect-to-wifi-or-create-an-encrypted-dhcp-enabled-ad-hoc-network-as-fallback/. I seem to be able to connect to the wifi network after being prompted for the WEP key, although the wifi icon on the idevice does not appear, and I seem to have an ip address of (169.254.x.x IP address ranges seem to indicate issues?) on the idevice, and whatever I try to access over iSSH from the idevice I never seem to get a working connection (I've tried to connect to from the idevice). I've even tried setting up static ip of 10.0.0.x and a subnet mask of on the idevice - no luck.

Am I missing something obvious, am I expecting to be able to SSH from the idevice to the RPI over an ad-hoc network when you simply cannot?

  • For clarification, you are trying to connect with an iOS device on the same network?
    – demure
    Commented Jun 9, 2013 at 19:06
  • I need to be able to connect an idevice to an RPi at the beach miles away from any WiFi access points/routers. I can use iSSH at home to successfully connect to the RPi. Commented Jun 9, 2013 at 21:43
  • Can you connect to the RPi's ad-hoc network with any other device besides your iDevice?
    – Jawa
    Commented Jun 10, 2013 at 13:39
  • Hi Martin, to me your question and comments posted to some of the answers are very confusing. Do you want to access your RaspberryPi when it has no network connectivity? If your PI has no network connection, then you will not be able to access it. If you want to access your PI over the internet, then you first need to be able to access the PI locally then you need to configure your network's firewall to enable remote access to the PI's IP address from the Internet. Perhaps you need to rephrase your question as to exactly what you want to do. Commented Jun 10, 2013 at 20:05

5 Answers 5


First thing you need to do is set up your Pi as an AP (access point). While you can create an "ad-hoc" network, people state having difficulties connecting to their Pi from other devices.

Once your Pi AP is up and running, you should be able to connect to its network via any other wi-fi device. Once part of the network, connecting to the Pi with SSH/HTTP/etc. should be easy.

When you set up your AP, please use one of the reserved private address spaces - 10.x.x.x, 172.16.x.x-172.31.x.x or 192.168.x.x . And when your iDevice reports an IP of 169.254.x.x, that means it could not find a DHCP server, and picked an IP at random. DHCP should be part of your Pi's AP setup.

Hope this helps!

  • This does help. I was able with the support of the following to use an access point instead of an ad hoc network to successfully SSH from an idevice to a RPi completely wirelessly and without the support of any other network: raspberrypi.org/phpBB3/viewtopic.php?f=46&t=25921 Commented Jun 11, 2013 at 18:09

The answer is yes!

I did

  1. I configure a vpn using logmein hamachi
  2. I install hamachi on my raspberry
  3. I register my iphone into the VPN where my raspberry is
  4. I connect to the vpn from my iphone
  5. I use iSSH app to connect to the raspberry to the ip provided by logmein (both - raspberry and iphone should be active into the vpn)

If you need more details, just ask, not problem at all. iphone issh logged into my raspberry P.D

Demure suggest an interesting alternative I'll give it a chance.


I have 2 RPis and use VSSH on my iPad to connect to them. That said I only do this at home and then over WiFi.

In theory it would work over 3G and the internet, but then I'd need a static IP or Dynamic DNS and I'd need to open up my router to allow network traffic in. I can do this for my Mac and PC, but haven't opened up the port to my RPIs. No reason why it wouldn't work.

Looks like you are missing the static IP (and 10.10. wouldn't be a valid one). Your ISP will have given you an IP address, but it will be changing every hour or two (so 169... would have been that). You need to either get them to give you a static IP (which will cost a lot) or use a service like Dynamic DNS to repeatedly capture your changing IP address and update the internet DNS servers so your address can be found. If you go to DynDNS.org they have FAQ and how-tos that will explain this in more detail.

  • Derek, sorry, I can understand now how my question was confusing. It made sense when I wrote it in my head! So "outside a network" meant without any network present. Commented Jun 9, 2013 at 21:48
  • You would have 3G though I assume? If you have no 3G signal, then you won't be able to see anything on the internet. As long as you have 3G (or Edge/2G) then you can see the internet and VSSH would work - once you've worked through the IP address issues. Commented Jun 9, 2013 at 21:54
  • Derek, so assuming that the idevice had a 3G/Edge network, how could that help me SSH into the RPi if the RPi is also with me and not able to see any wifi network? Commented Jun 10, 2013 at 8:30
  • OK, I see what you're trying to do now. Basically you don't have a wireless access point and you have two wireless devices that you want to get to communicate with one another. I don't think you can do that. I think if you had a WAP (like you have at home) you could get both devices to connect to the WAP and then they could see one another, since they'd be on the same wireless network. But without a WAP there's nothing for the RPi to connect to. What if you created a personal hot spot on your iPad and you connected to that. Then your iPad and RPi would be in the same wireless network. Commented Jun 12, 2013 at 5:07

If you have access to a server on the internet, you could use it for reverse ssh.

Reverse SSH

With reverse SSH you make use of an external server, and set up a listening ssh session. Then, on the external server you can connect to the device behind the router without being bothered by firewalls/port forwarding/etc... This is what I prefer (as I haven't set up a VPN yet), but I have access to an external server.

You could do this with:
Device on home network ssh -f -N -R 1234:localhost:22 [email protected]

  • Where 1234 is the port that remote would use forward to the device
  • remote.server.example is the remote's address

Then, on the remote server ssh -p 1234 -t device_user@localhost

  • Demure, I need to get the hang of asking succinct questions - sorry for that. So the scenario is: ot of range of any network (wifi or 3g), bing able to SSH from an idevice to the RPi using a USB wifi dongle. As mentioned earlier, I've attempted setting up the RPi using isc-dhcp-server, and I can see the network from the idevice, and authenticate the WEP key, but I cannot get the RPi to recongise any connection attempts. This all works at home on the local home network perfectly - I just need to do this when in a remote situation. Commented Jun 10, 2013 at 8:28

Here is the best one: Turn on wifi hotspot on your ipad/iphone. Setup wpa_supplicant and /etc/network/interfaces on your Pi to connect to your iDevice. Now, both your iDevice and Pi have internet connection through your LTE! Of course you can ssh into your pi. Yes, you can have your cake and eat it too!

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.