远程应用程序能否通过X11转发使用本地usb设备?

远程应用程序能否通过X11转发使用本地usb设备?,usb,local,x11-forwarding,Usb,Local,X11 Forwarding,我正在运行一个远程应用程序,并使用x11转发在屏幕上显示它。我可以让远程应用程序使用我的本地usb端口访问设备(例如usb磁盘)吗?如果是,请提供详细程序 谢谢 如果您只需要在USB驱动器上读/写文件,这应该可以完成这项工作 您可以使用sshfs在远程计算机上安装本地usb: 您需要在两台计算机上安装ssh: $sudo apt-get install ssh 插上你的U盘。您可能有自动安装功能,如果没有,请手动安装usb驱动器: $sudo mkdir /media/localUSB $su

我正在运行一个远程应用程序,并使用x11转发在屏幕上显示它。我可以让远程应用程序使用我的本地usb端口访问设备(例如usb磁盘)吗?如果是,请提供详细程序


谢谢

如果您只需要在USB驱动器上读/写文件,这应该可以完成这项工作

您可以使用sshfs在远程计算机上安装本地usb:

您需要在两台计算机上安装ssh:

$sudo apt-get install ssh
插上你的U盘。您可能有自动安装功能,如果没有,请手动安装usb驱动器:

$sudo mkdir /media/localUSB
$sudo shown YOUR_LOCAL_USER /media/localUSB 
#replace YOUR_LOCAL_USER with your current user name of the local machine
$sudo mount /dev/sdbX /media/localUSB 
#replace X with your usb device number
然后,您需要在远程计算机上安装sshfs:

$sudo apt-get install sshfs
$sudo mkdir /media/remoteUSB
$sudo shown YOUR_REMOTE_USER /media/remoteUSB 
#replace YOUR_REMOTE_USER with your current user name of the remote machine
在远程计算机上为U盘创建装入点:

$sudo apt-get install sshfs
$sudo mkdir /media/remoteUSB
$sudo shown YOUR_REMOTE_USER /media/remoteUSB 
#replace YOUR_REMOTE_USER with your current user name of the remote machine
最后,使用sshfs安装:

$sshfs LOCAL_COMPUTER_ADRESS:LOCAL_USB_MOUNT_POINT /media/remoteUSB  -o ssh_command="ssh -l YOUR_REMOTE_USER" #l is L, not one
#replace LOCAL_COMPUTER_ADRESS with your local computer ip or host name
#replace LOCAL_USB_MOUNT_POINT with the directory whre the usb is mounted. If you made de manual mounting process, it should be: /media/localUSB
#replace YOUR_REMOTE_USER with your current user name of the remote machine

我不知道是否可以使用sshfs远程装载/dev/sdbX。如果您需要直接访问USB端口,您应该尝试一下,但我从未尝试过。

如果您只需要在USB驱动器上读/写文件,这应该可以完成

您可以使用sshfs在远程计算机上安装本地usb:

您需要在两台计算机上安装ssh:

$sudo apt-get install ssh
插上你的U盘。您可能有自动安装功能,如果没有,请手动安装usb驱动器:

$sudo mkdir /media/localUSB
$sudo shown YOUR_LOCAL_USER /media/localUSB 
#replace YOUR_LOCAL_USER with your current user name of the local machine
$sudo mount /dev/sdbX /media/localUSB 
#replace X with your usb device number
然后,您需要在远程计算机上安装sshfs:

$sudo apt-get install sshfs
$sudo mkdir /media/remoteUSB
$sudo shown YOUR_REMOTE_USER /media/remoteUSB 
#replace YOUR_REMOTE_USER with your current user name of the remote machine
在远程计算机上为U盘创建装入点:

$sudo apt-get install sshfs
$sudo mkdir /media/remoteUSB
$sudo shown YOUR_REMOTE_USER /media/remoteUSB 
#replace YOUR_REMOTE_USER with your current user name of the remote machine
最后,使用sshfs安装:

$sshfs LOCAL_COMPUTER_ADRESS:LOCAL_USB_MOUNT_POINT /media/remoteUSB  -o ssh_command="ssh -l YOUR_REMOTE_USER" #l is L, not one
#replace LOCAL_COMPUTER_ADRESS with your local computer ip or host name
#replace LOCAL_USB_MOUNT_POINT with the directory whre the usb is mounted. If you made de manual mounting process, it should be: /media/localUSB
#replace YOUR_REMOTE_USER with your current user name of the remote machine
我不知道是否可以使用sshfs远程装载/dev/sdbX。如果你需要直接访问USB端口,你应该试试,但我从来没有这样做过