Is it possible to plug an Ethernet-to-USB cord into a Raspberry Pi's Ethernet port and the USB end into a laptop's USB cord to immediately share Internet connection with the Pi? My laptops don't have Ethernet ports and I'd like to ssh into raspberrypi.local without the Pi having to be set up to connect to the same network as the laptop. Plus, I'd like if I don't need to set up any configuration to share the connection (So I could ssh into the Pi right upon plugging it into a laptop.).

I was thinking of a cord like this with an Ethernet cord plugged into the port on the cord:

enter image description here

  • You provide minimal information - like what OS is on your laptop. NOTE You can have ICS OR ssh access to the Pi, NOT BOTH.
    – Milliways
    Mar 14, 2017 at 1:41

1 Answer 1


Yes, that should work. You need 1 ethernet port on your Raspberry Pi and 1 ethernet port on your PC to connect your Raspberry Pi to your laptop. You can use a USB to ethernet cord when you don't have an ethernet port available.

  • If you have a Raspberry Pi 3 B and a laptop with an available ethernet port, just connect those with an ethernet cord, no need for USB to ethernet cords.
  • If you have a Raspberry Pi without an ethernet port and a laptop with an available ethernet port, you need 1 USB to ethernet cord for the Raspberry Pi.
  • If you have a Raspberry Pi without an ethernet port and a laptop without an available ethernet port, you need 2 USB to ethernet cords, 1 for the Raspberry Pi and 1 for the laptop.

To set up SSH on a fresh install of Raspbian:

  • Use a keyboard and display, run sudo raspi-config and set up SSH from there.
  • Alternative method (when you have no keyboard or display): make a file called ssh in the /boot/ directory of Raspbian before you boot your Raspberry Pi.

I should also mention that some people are using SSH over USB for the Raspberry Pi Zero (without using WiFi or ethernet). This is done by enabling "gadget mode" on the Raspberry Pi Zero, allowing the Raspberry Pi Zero to become both host/slave over USB.

  • Are there any USB-to-Ethernet adapters for the laptop? I am planning to use this as a portable Linux system with internet...
    – anonymous
    Mar 14, 2017 at 16:23
  • Ofcourse there are, you even posted a picture of one in your question.
    – Max
    Mar 15, 2017 at 8:29
  • Would I need 2?
    – anonymous
    Mar 16, 2017 at 11:52
  • I edited my question. It depends on your available network ports.
    – Max
    Mar 17, 2017 at 11:02

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.