datguy.dev
Posts: 19
Joined: Thu Jun 11, 2015 11:12 pm

Gah! SSH-ing the things

Thu Jun 11, 2015 11:49 pm

Greetings,
New to these parts, sorry first post has to be a question :D yey!

Anyhow, I was wondering if anyone would be willing to assist me in getting the networking situation; situated. The Pi in question is a Model A Rev 1 running Raspbian. I'm using it to control a robot, therefore I require ssh. The overall issue is simply I can't ssh to it. Moreover, every remedy I've tried ends up failing then I have to disassemble my bot to get the Pi out to use the HDMI connection to revert the changes. I'm stuck in a pretty annoying intermittent cycle.

1. I've set a static IP to the Pi using /etc/network/interfaces config before. But can't now for some reason, even when using the same configs as before, with same setup - different last octet of course. I tried 4 times to avoid an IP conflict using various toots online such as Adafruits. Fails, so I just went with dhcp. But I don't want dhcp. I'm using a static IP on my other machines so I don't understand the issue with the Pi.

2. I can't ssh into the Pi when only using wireless (Edimax 7811un). After failing, I plug in Ethernet. Ssh via ethernet successfully. Then only am I able to ssh using the wireless interface. Simply adding 'wireless-power off' to /etc/network/interfaces prevented me from ssh-ing to it entirely.

After hours and hours messing with this. I thought I'd reach out for a second opinion.

Thanks!

Code: Select all

pi@raspberrypi ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:ad:d9:e3
          inet addr:192.168.1.117  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1028 errors:0 dropped:0 overruns:0 frame:0
          TX packets:827 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:715871 (699.0 KiB)  TX bytes:126099 (123.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:212 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:21472 (20.9 KiB)  TX bytes:21472 (20.9 KiB)

wlan0     Link encap:Ethernet  HWaddr 74:da:38:2a:e3:b0
          inet addr:192.168.1.116  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:947 errors:0 dropped:209 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:124099 (121.1 KiB)  TX bytes:4262 (4.1 KiB)

pi@raspberrypi ~ $ sudo /etc/init.d/networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not r[warnble some interfaces ... (warning).
[....] Reconfiguring network interfaces...if-up.d/mountnfs[eth0]: waiting for interface wlan0 before doing NFS mounts ... (warning).
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
RTNETLINK answers: File exists
Failed to bring up wlan0.
done.
pi@raspberrypi ~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.1.117
        netmask 255.255.255.0
        gateway 192.168.1.1

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
        wpa-essid Ritchie2media
        wpa-psk *************
        address 192.168.1.118
        netmask 255.255.255.0
        gateway 192.168.1.1
pi@raspberrypi ~ $ ping -I eth0 google.com
PING google.com (74.125.228.196) from 192.168.1.117 eth0: 56(84) bytes of data.
64 bytes from iad23s23-in-f4.1e100.net (74.125.228.196): icmp_req=1 ttl=53 time=41.6 ms
64 bytes from iad23s23-in-f4.1e100.net (74.125.228.196): icmp_req=2 ttl=53 time=41.5 ms
64 bytes from iad23s23-in-f4.1e100.net (74.125.228.196): icmp_req=3 ttl=53 time=46.8 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 41.539/43.325/46.801/2.458 ms
pi@raspberrypi ~ $ ping -I wlan0 google.com
PING google.com (74.125.228.193) from 192.168.1.117 wlan0: 56(84) bytes of data.
From 192.168.1.116 icmp_seq=1 Destination Host Unreachable
From 192.168.1.116 icmp_seq=2 Destination Host Unreachable
From 192.168.1.116 icmp_seq=3 Destination Host Unreachable
^C
--- google.com ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4159ms
pipe 3
pi@raspberrypi ~ $ ping -I wlan0 192.168.1.1
PING 192.168.1.1 (192.168.1.1) from 192.168.1.117 wlan0: 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=15.7 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=8.66 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=7.04 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=8.33 ms
^C
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 7.049/9.950/15.747/3.402 ms
pi@raspberrypi ~ $ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 4.2.2.2
pi@raspberrypi ~ $

datguy.dev
Posts: 19
Joined: Thu Jun 11, 2015 11:12 pm

Re: Gah! SSH-ing the things

Sat Jun 13, 2015 12:18 am

I'm not going to be checking back for replies so you can close this. Unsolved.

Return to “Troubleshooting”