HACKER Q&A
📣 WorldDev

Control 2 air-gapped computers with 1 mouse and keyboard


Hi all, I am trying to control 2 computers that are air-gapped, with 1 mouse and keyboard.

Using any standard usb switch or KVM breaks the air-gap, as malware can (and has been known to) spread via kvm and USB switches.

Here are the solutions I am exploring:

- Use a mouse and keyboard via bluetooth, using the switch inside the device to switch computer. For example the logitech MX mouse can switch from one computer to the other. However, does anyone know if it's a hard switch from one computer to the other, or if the mouse stays connected to both?

- Create link (via usb or serial) from one computer to the other, to use the keyboard and mouse from one on another. That breaks the airgap, but maybe there's a way to make the link simple and secure enough. I had a lot of great advice from another post here, but I think I need to explore other options as well.

- Use a mechanical usb switch that physically disconnect the a path when switching to the other. I search a while on the internet, and couldn't find a device like that. They all keep connected to both.

Does anyone have any advice?


  👤 NitpickLawyer Accepted Answer ✓
First, before you do anything you should check if you even should do this. Modern peripherals may have local storage (for drivers and such) and they may be visible (even automounted) by the OS. In that case your risk profile may not allow it (see stuxnet). Also be aware that sharing one keyboard will make you prone of brainfarting and muscle memory your credentials from one PC to the other. Depending on the reason behind airgapping, that may or may not be frowned upon.

Anyway, I use a "dumb" version of this setup, out of convenience. I have a dumb USB switch, with only one host connector. I use 2 cables, and have them tied together with a binder paperclip thingy. On the (rare for me) occasion I need to switch, I just unplug one cable and plug the other.


👤 turtleyacht
Previous context: Ask HN: Advice for creating a USB device linking 2 computers - https://news.ycombinator.com/item?id=45706169