October 11, 2023
October 11, 2023

How to Mount Remote Directories with SSH (+Video Tutorial)

Advertisements


Learn how to easily mount remote directories with the help of a more secure SSH tool. Follow along with Jack Wallen in our step-by-step tutorial.

Do you have remote directories you need to mount on your local desktop so you can work on code, configurations, documentation or just about any kind of file? If those remote files are on a server and you don’t want to share them via the less secure Samba, Secure Shell has you covered.

Thanks to an app called Secure Shell File System (a.k.a. sshfs), you can easily mount remote directories, with the help of the more secure SSH tool. Let me show you how it’s done. I’m going to demonstrate on an Ubuntu-based Linux distribution, so if you use a different OS, you’ll need to modify the installation command.

  1. To install sshfs, open a terminal window and issue the command:
    sudo apt-get install sshfs -y

    Once the application is installed, you’re ready to use it.

  2. Let’s say you want to mount your home directory on a machine at IP address 192.168.1.60 and mount it on a local directory called MOUNT. To do that, the command would be something like this:
    sshfs [email protected]:/home/USER /home/USER/MOUNT

    where USER is your username. You’ll be prompted for the remote user’s password.

  3. Upon successful authentication, the remote directory will be mounted in the MOUNT directory. You can verify this by issuing the command:
    ls MOUNT

    from within the parent directory housing MOUNT, and you’ll see a listing of the remote directory contents. Now you can open those files as though they were on your local machine.

And that’s how easy it is to mount a remote directory to your local machine with the help of sshfs. This method is more secure than using a Samba share and is far easier than NFS. Give sshfs a try and see if it makes your workflow easier.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.



Source link

61 Bridge Street
Kingdon
Herts
Top locations – from restaurants and clubs, to galleries, famous places Local Business Directory - Events - Jobs - Classifieds and so much more...
© 2023 All Rights Reserved By StepInto Group Ltd
crossmenu