I am having trouble connecting to my Raspberry Pi over SSH when it is connected through WiFi. When the RasPi is connected through Ethernet everything works fine. However, when it is connected through the WiFi dongle, I can ping the router (on 10.0.0.2) and access the internet from the RasPi, but I cannot SSH to it (the ssh-command does not respond and eventually reports "Operation timed out"). I also cannot ping the RasPi on the static IP address assigned to it.
The WiFi dongle that I'm using is TP-Link TL-WN823N. I set it up on a static IP 10.0.0.28 using WICD. It is interesting that when I tried connecting via SSH with this WiFi dongle for the first time earlier this week, it did work. Now, that I'm trying it again, however, it is not working anymore. I didn't make any configuration changes as far as I can tell.
I have run some commands in order to provide you with some diagnostic information. All of these commands were run after I booted up the RasPi with the WiFi dongle connected, but with no Ethernet cable connected. I'm trying to connect to the device through 10.0.0.28 (as you might notice from /etc/network/interfaces, I have configured static IP 10.0.0.27 for ethernet; the static IP's for both interfaces used to be the same when I first had this problem, so I changed them to have different ones, just in case it might have caused some clash. Needless to say, that didn't work).
$ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:c2:f1:37
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
wlan0 Link encap:Ethernet HWaddr c0:4a:00:1b:32:ca
inet addr:10.0.0.28 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:95 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8866 (8.6 KiB) TX bytes:8377 (8.1 KiB)
$iwconfig
wlan0 IEEE 802.11bg ESSID:"Mercutech" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.412 GHz Access Point: 00:26:F2:26:B4:62
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=85/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo no wireless extensions.
eth0 no wireless extensions.
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet static
address 10.0.0.27
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.2
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
$ cat /etc/resolv.conf
nameserver 10.0.0.2
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 wlan0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
$ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1