LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't ssh from one raspberry pi to another (https://www.linuxquestions.org/questions/linux-newbie-8/cant-ssh-from-one-raspberry-pi-to-another-4175565023/)

iFunction 01-21-2016 03:26 AM

Can't ssh from one raspberry pi to another
 
Hi,

I'm sure this is very simple but I can't figure it out.

I have two raspberry pi's connected directly with ethernet cable, network interface files static IP as follows:
Code:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inte static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

the other Pi has ip of 192.168.1.110 but the rest the same.

Code:

Pi@raspberry ~ $ sudo ssh pi@192.168.1.110
ssh: connect to host 192.168.1.110: No route to host

What am I doing wrong this time?

iFunction 01-21-2016 04:00 AM

just did ifconfig on both, one is fine, the other is getting the ip address of 169.254.190.133?????????????????

Where is it getting this ip address from, it is just connected to the other raspberry pi with static ip addresses ???

Doug G 01-21-2016 05:44 PM

Double-check your static IP setup on the failing pi. I think the 169.154. address is automatically created when your connection is configured to use dhcp but a dhcp server can't be located.

iFunction 01-22-2016 05:29 AM

Hi Doug,

Thanks for your input, after a little research, you are spot on, a computer will be assigned an IP address in the range 169.254.1.0 - 169.254.254.255 range to avoid any conflict with any other IP addresses on the network. This range is reserved specifically for this purpose by Microsoft.

It crops up if the OS thinks that it is getting IP address automatically but isn't actually getting one. In the case of this raspberry pi, though I can't check now as I had to clone a new sd_card, it was supposed to be exactly the same as the other Pi I have configured, I had DHCP enabled as well as having a static IP address assigned and I suspect that I had them both set to auto, thus confusing the operating system.

Good to know.


All times are GMT -5. The time now is 06:46 PM.