When travelling, connecting to a Raspberry Pi can be problematic if you there is no wifi or a shared network available. I discovered this trick a few years ago whilst stuck in an airport lounge, and have been meaning to blog it for my future self. Until, a couple of weeks ago I faced the same challenge in an office where there was no network, or means to connect a headless RPi and debug some Python.

Using a low-cost USB-Ethernet adapter you can attach to a RPi easily using just an ethernet cable:

Then ssh using it’s hostname and the .local suffix eg:

ssh pi@raspberrypi.local

VS Code Remote Development using SSH on a RPi

There is a handy Visual Studio Code Remote SSH extension for VS Code that makes opening remote folders even easier, whilst leveraging other VS Code extensions capability.

Then you can simply connect directly to the device, poke around the file system and debug :)