Preventing USB access

I have a Raspberry Pi next to my main workstation which I use for email. To control it I use the excellent Synergy Application over a ssh tunnel which means that I don’t need an extra keyboard or mouse. This works great especially as Remote Keyboard Locking is supported by xscreensaver and Synergy. Once I lock the main workstation the Pi also locks.

However I also want to stop people been able to simply walk up and plug in a keyboard and mouse. To prevent this I followed the instructions of Sergey Manucharian on Stackoverflow to disable usb via udev.


# cat /etc/udev/rules.d/99-disable-usb-hid.rule
SUBSYSTEMS=="usb", DRIVERS=="usbhid", ACTION=="add", ATTR{authorized}="0"

 

Of course anyone could take the sdcard out and remove this line. In my case this isn’t an issue as it’s a default image and I don’t store anything on there.

This entry was posted in General. Bookmark the permalink.

2 Responses to Preventing USB access

  1. STRSHR says:

    By email you mean a client or the server? What’s the benefit of having a dedicated RPI for it?

  2. ken_fallon says:

    I have a dedicated email client running on a different network. The Pi sits on that network and the only connection between the two networks is inbound ssh from mine to it.

    However there are lots of uses for this, where you have computers on different networks.

Leave a Reply

Your email address will not be published.