I'm trying to read /dev/ttyUSB0 of another computer mounted via sshfs, however commands such as cat /mnt/tmp1/dev/ttyUSB0 return "Permission denied" (I'm mounting the filesystem to /mnt/tmp1).

  • I've mounted the file system as root
# The machine whos serial port I want to access is called "trogdor"
sudo sshfs -o allow_root -o IdentityFile=$HOME/.ssh/id_rsa root@trogdor:/ /mnt/tmp1/
  • I can do other things in the file system as root so I'm pretty sure I have root permissions on the mounted file system.
  • When in an ssh session I cat cat /dev/ttyUSB0 with no problem.

Most anything in /dev is an entry point into the kernel for a particular device. By accessing the device file, you are actually still opening the device on your local system, not on the remote server. As an extreme example of this, you can have a system that boots off of the network and the root drive is an NFS mount. On the local server, the root partition may be /dev/sda1 and on the remote server it has the same path. Which one takes precedence?


A network file system such as sshfs only provides the ability to read files and directories on the remote host. Even if you can include device files on the remote system in the mounted file system, that does not mean you can interact with the underlying device driver on the remote host.

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.