1

I've got a pi 3B to which I always ssh over my home network. I'm now going to be traveling for some time and I want to mess around on the go. I read that you can connect directly to the pi using a basic ethernet cable. Unfortunately my laptop doesn't have an ethernet plug.

I found some ethernet to usb adapters for sale, so I guess I could use that together with an ethernet cable to connect my pi directly to my laptop. But before I buy that stuff I thought I'd ask here for tips.

So does anybody know if it is possible to ssh into my pi using an usb to ethernet adapter between my laptop and my pi? And also, can I share my laptop its internet connection over that cable? All tips are welcome!

ps. My laptop is running Ubuntu 18.04 (don't know if that matters).

kramer65
  • 277
  • 2
  • 8
  • Yes (and yes...). Another option would be to use a USB wifi adapter instead and run a hotspot with it on the laptop. This is slightly more complicated on the laptop side. – goldilocks Dec 08 '18 at 23:19
  • The other way around you can run a hotspot on the RasPi and connect to it with the laptop by wifi. Then you don't have to buy anything. – Ingo Dec 09 '18 at 00:54

2 Answers2

2

The short answer is YES (assuming the usb to ethernet adapter works).

You can ssh - address the Raspberry Pi with raspberrypi.local (or substitute your hostname). See How to set up networking/WiFi

You however CANNOT have both ssh and Internet Connection Sharing - you have to use one or the other. (It actually is not impossible - buy you have to set up virtual interfaces and complex bridging interfaces - this is not a Pi issue).

However if you can ssh to the Pi over Ethernet, you could then connect the Pi to the Internet via WiFi. (You may need to change WiFi country in /etc/wpa_supplicant/wpa_supplicant.conf) You could also use VNC to the Pi.

Not your question, but when travelling I bring a compact Bluetooth keyboard and mouse and a hdmi cable to connect the Pi - you can usually find a TV with hdmi input.

Milliways
  • 54,718
  • 26
  • 92
  • 182
0

I know I'm a bit late to the party, but use this tutorial. I used it and it worked for me.

Kovy Jacob
  • 101
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 11 '22 at 08:07