I have a raspberry pi with a picamera that is connected to a device remotely. I can stream the camera to the local network so that I can record and watch the camera. This works fine, I just have to ssh into the pi and start the stream. However, I also want to connect to another device (that isn't on the wireless network) via ethernet. As soon as I plug the ethernet cable into my laptop, it stops being able to ssh to my raspberry Pi (see screenshot). How can I connect to the raspberry pi via ssh whilst also being connected to another network via ethernet?

I have tried

ssh -b [ip address] pi@[pi ip address]

with no success

for the first line, I have ethernet connected. Then I disconnect it and ssh to my pi just fine. I cancel the ssh, connect my ethernet, and try again. It times out.


As it can be seen on the screenshot you provided, when you connect the Ethernet cable, the router on the Ethernet connection ( becomes your default gateway with metric 100, which is lower than the metric assigned to the router on WiFi connection ( So all connections to addresses that are not in any of your local networks ( and go via that router.

If is the address of your Pi, it does not belong to any of these networks, so your computer attempts to connect to Pi via the router, but it is not reachable over that router. You need to connect to your Pi via the router, so you need to add an appropriate route to your routing table. You can for example add a route to via You can add it in the network settings, in the "IPv4" tab, by typing the network address, mask and gateway into the fields below "Routes" header (see screenshot below).

enter image description here

  • If just the screenshot for this answer is in English... – wyphan Mar 19 at 16:22
  • @wyphan I jut provided a screenshot from my own system :). But regardless of language version, the window looks the same, so you can easily match this screenshot to the actual window on your own system... – raj Mar 21 at 11:04

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.