2

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).

2
  • 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
    Commented Dec 8, 2018 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
    Commented Dec 9, 2018 at 0:54

2 Answers 2

3

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.

0

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

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.
    – Community Bot
    Commented Feb 11, 2022 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.