First of all my goal is this, have a computer as a peripheral device to connect it to anyone's computer with ssh protocol or web. The idea is doing this by using a plug and play USB cable .

Facts that I know:

  • USB is designed as Master/Slave Architecture, so simple connection doesn't work beacuse both computer are acting as a host.
  • Ethernet is the simplest solutions, I know but I don't want to loose that interface.
  • There is a cable that makes a connection as USB PC to PC cable link. But I am not sure if we can get ssh work with this.

Searching I found the RNDIS protocol, I think this maybe has a solution to my problem but I don't what is this for exactly. Here it says:

RNDIS support allows a PC to talk to a Linux-based embedded system over USB by making the embedded system look like a USB attached Ethernet adapter.

This is pretty much what I need. Could somebody guide me on what I want? Maybe I am missing the point, I do not know.

I have compile a new kernel with the USB GADGET DRIVERS options and setup g_ether.ko module. When I tried to load the module

sudo modprobe g_ether
FATAL: Error inserting g_ether (/lib/modules/3.13.2/kernel/drivers/usb/gadget/g_ether.ko): No such device`


ls /lib/modules/3.13.2/kernel/drivers/usb/gadget/
-rw-r--r--  1 root root 25072 feb 14 15:04 gadgetfs.ko
-rw-r--r--  1 root root  9660 feb 14 15:04 g_cdc.ko
-rw-r--r--  1 root root  5888 feb 14 15:04 g_dbgp.ko
-rw-r--r--  1 root root 11676 feb 14 15:04 g_ether.ko
-rw-r--r--  1 root root 12072 feb 14 15:04 g_mass_storage.ko
-rw-r--r--  1 root root 22548 feb 14 15:04 g_printer.ko
-rw-r--r--  1 root root  9604 feb 14 15:04 g_serial.ko
-rw-r--r--  1 root root 29748 feb 14 15:04 g_webcam.ko
-rw-r--r--  1 root root 13576 feb 14 15:04 g_zero.ko
  • I have often seen that embedded systems have a USB slave port (for communication and/or providing power to the board). you wont have that on a normal computer.
    – Anthon
    Feb 17, 2014 at 19:45

1 Answer 1


USB is designed as Master/Slave Architecture, so simple connection doesn't work beacuse both computer are acting as a host.

Not true. Any laptop that charges by USB-C must enter slave/device mode for USB Power Delivery compatible power bricks to charge the laptop, as USB-PD is required to get more than 12 watts of power over USB. The error you received in trying to load the Ethernet USB gadget module could be because there are no USB-C ports on your computer.

  • The first version of the USB-C specification was published in August 2014.That question was written in early 2014, so USB-C did not exist even as a published specification back then, let alone as existing products. And Linux kernel version 3.13.2 the question is talking about certainly does not have USB-C support. The gadget drivers are not for USB-C exclusively: Linux supports some device/slave side USB chips too, and did so well before USB-C.
    – telcoM
    Jun 20, 2020 at 10:28
  • Yes, of course USB-C was from late 2014 but USB 3.0, from 2010, supports debug/slave/host-to-host mode on USB-A ports. This was on my mind when I saw this but for some reason didn't include that in my original comment. Host to host connection by USB 3.0 and USB-A was supported for over 3 years by 2014. Indeed that is my bad for not completing my thought by following up my contemporary commentary with how this was possible even in 2014. There's documents from 2012 on how to set up a USB-A to USB-A connection on Windows 8, so not terribly unreasonable to expect something similar from Linux.
    – MacGuffin
    Jun 20, 2020 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .