Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 50424  / 2 Years ago, sun, october 23, 2022, 6:06:51

I've got one desktop computer Ubuntu 11.04 with an external USB drive mounted on it on the home WRT54L Linux network (192.168.0.2), and when I arrive at home with my laptop, I want to be able to mount the external USB drive from my Ubuntu 11.04 laptop (192.168.0.3) to the desktop, without having to unplug it from the desktop, that is accessing it.



Is it possible to send, via a terminal command, a remote mount command to the desktop usb drive from my laptop? Ideally something that creates a local mountpoint I can just call locally from the programs installed in my laptop, like:




username@laptop ~ "mount the drive so the laptop can see it"
username@laptop ~ ./myprograminlaptop /my/file/which/is/actually/on/the/desktop/file.txt


Can I automate this process every time the laptop is connected to the home network?


More From » mount

 Answers
2

You need to use ssh for that - run sudo apt-get install ssh on both machines.



Then, you just have to go to nautilus on your laptop, File->Connect to Server..., select "SSH", enter the external IP of the desktop into the Server input box, the port is 22, the folder is /media/, the username is your username on your desktop. Click "Connect", you'll be asked for your desktop password.



To mount the drive, open up the terminal, type in ssh yourusernameondesktop@yourdesktopsip, enter the password, and use the mount command.



sudo mkdir /media/flashdrive
sudo mount /dev/devicename /media/flashdrive


Make sure your password is safe - remote access can be used against you.



Note: I assumed that you are in a different network because you mentioned your home. Please clarify that.


[#44496] Sunday, October 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
igeonlothe

Total Points: 370
Total Questions: 121
Total Answers: 114

Location: United States Minor Outlying Island
Member since Fri, Feb 5, 2021
3 Years ago
;