0

So im 3 days in to working on the rPi. My current issue is trying to ssh in to my Pi on new networks. I have successfully connected to my Pi via ssh on networks that I have manually logged in to (using raspbian os UI).

what I've tried:

Modifying where the wpa_supplicant.conf is read from in etc/network/interfaces to read from /boot

adding an ssh file in the boot partition of the sd card.

I can ping the router and get all of the connected ip address and can see that it is connecting to the network; showing me that, my modification to the path of where remembered networks is working. However, I am getting a connection refused and a connection timed out error when trying to ssh in now.

Any leads in the right direction are greatly appriciated.

  • It is not clear what you are trying to do. – Milliways Feb 28 '17 at 23:23
1

First make sure the Raspberry got its IP address (i.e. is successfully connected with the network) and you can ping it at all. SSH should work then, unless a firewall is blocking its port (22) or connections between hosts are disabled (i.e. host isolation - common on wireless networks). I assume you've got a Raspberry on a wired network, because wireless won't go online on unknown networks.

The easier way:

Use a program called Adafruit Pi Finder ( https://learn.adafruit.com/the-adafruit-raspberry-pi-finder/overview )

The harder way:

If a Unix/Linux computer is available, try:

ip addr

Find your IP address and determine the subnet address. Most typically the 192.168.x.y is used for local area networks, and unless it's very specific, the 255.255.255.0 or /24 (24 bits out of 32 bits which form the full IPv4 address) subnet mask is used. It means that the last number (y) determines the individual host, and the preceding numbers (192.168.x) determine the subnet.

Now you need to scan the network with nmap (if it's not installed, get it with your package manager):

nmap -sP 192.168.x.0/24

If you do it as an administrator, i.e.

sudo nmap -sP 192.168.x.0/24

you'll probably see the MAC addresses and manufacturers of the devices connected to the network. The Raspberry will probably be there.

0

Ive had issues doing the same when the pi is connected to a new network via WiFi. I'm not a network expert, but because of the many variables that change from one network to another I think connecting via WiFi on all of them will be a challenge. However, via ethernet, can you not just give it a unique static ip that can accessed? I even use the DHCP server on my computer when connected via ethernet and can always ssh in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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