Home
Username:
Password:
MasterClass! - Using Secure Shell (SSH) Tutorials

Basic Secure Shell Use / Mounting Remote File Systems with SSHFS




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

We've talked about some of the utilities that come with the Secure Shell package. Another utility, however, that's just as useful but that's not included by default with Secure Shell is the Secure Shell File System or SSHFS. Now, SSH File System is used to securely share a remote file system across the network. Not only are you sharing a file system that you can access remotely but it's across an encrypted channel. So it's a secure file system per se. Now, the SSH File System is not normally installed with SSH as I said. You normally have to install this as a separate package and that's OK. It's actually very easy to install using the Package Manager of whatever Linux distribution you're using. Now, there's no special setup required. You really don't have to do anything on the server side. Basically you just have to have a directory that you want to use on a remote system and you have to have permissions to that directory. That's it. Permissions just have to be set up. Now, on the client side, all you really have to do is set up a mount point and then you mount the share as you normally would mount a share across the network only you're doing it over Secure Shell. Set the mount point and then you connect to that share and set it to the mount point. After you are done using it, you can choose to unmount it with fusermount command. Let's go ahead and take a look at an example of how Secure Shell File System works and how you can use it. We're in the terminal window of Computer A and what we're going to do first is make a mount point so that we can mount a remote file share onto Computer A and the remote file share is actually going to reside on Computer B. So let's first make a mount point. Let's make it /MMT/ shadow and that gives us a mount point. Now we're going to connect to that share using SSHFS and we're going to put the user name and IP address in there and we're going to specify the remote share that we're going to connect to and we're going to specify the mount point that we're going to connect to, which is the one we just made; /MMT /data. So we're going to connect to 172.16.30.30 as root and we're going to connect to the /data directory on that particular computer, on Computer B and we're going to mount that under /MMT /data on our local computer. So let's go ahead and hit Enter and we're going to be prompted for password and how we can determine if this worked or not is now we're going to go to that particular mount point and see what we get. So we've got that. Now let's do an LS on it and we see that there's a file in there called Confidential.txt. And that is being shared across the network now through Secure Shell. It's encrypted, that session is encrypted and we're able to access remote shares through this mount point over SSHFS. Now, if we want to we can use this for a while and then we want to disconnect this. We may or may not want to leave this connected. So we can go ahead and disconnect that as we see fit using the fusermount command. We'll add a -U on there and they're going to specify the remote mount point and actually we have to get out of this directory before we unmount it. And so now we will go fusermount -U and specify the mount point. And it's unmounted. So now if we go back to that mount point, let's go back into it. We go back into it. We don't have anything there. So the mount point took a second to break after we unmounted it but we are not connected anymore to that so we don't have access to that remote directory nor the data in it. So that's essentially all there is to using the Secure Shell File System. We saw that you could share remotely across the network and securely a directory on a remote computer under a mount point on our local computer. Secure Shell File System is a very good way to remotely connect to directories on other computers.

Tutorial Information

Course: MasterClass! - Using Secure Shell (SSH)
Author: Bobby Rogers
SKU: 33976
ISBN:
Release Date: 2009-03-13
Duration: 2 hrs / 20 lessons
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available