0

I have computer A and computer B. I have attached a pendrive /dev/sda5 on computer B and I want to mount it on computer A through terminal.

I don't want to use the GUI to connet to the server and then mount it. I want to mount through terminal. like: mount root@X.X.X.X:/dev/sda5 /home/xyz/Desktop or something like this.

Braiam
  • 67,791
  • 32
  • 179
  • 269
ishaan
  • 1

2 Answers2

0

1) connect to computer B from computer via ssh root@X.X.X.X:

2) search for the dev entry point into the computer B system as following :

2.1) lsusb or dmesg | grep -s "SCSI device" or grep SCSI /var/log/messages

with this, you will find the device entry point which will be used to mount the device.

3) create a mount point mkdir -p /mnt/myusb

4) mount -t vfat -o rw,users /dev/sda1 /mnt/myusb

(here, -t vfat is used to tell system that to mount vfat filesystem, with read/write permissions, and /dev/sda1 is the device entry point and /mnt/myusb is the directory where you will find the mounted device.)

GC 13
  • 291
0

If your pendrive has UUID, you can do this:

ssh user@ip sudo sh -c "mkdir /media/usb && mount /dev/sdb1 /media/usb"

Now if you want to access the contents of the pendrive in B from A you should set a Network File Share which Boris already gave a link.

Braiam
  • 67,791
  • 32
  • 179
  • 269