Do you have an ssh login to a server? How would you like to access that on your Linux desktop as if it were local? As it turns out, this isn’t hard to do, thanks to the power of FUSE (Filesystem in Userspace). Here’s the quick and dirty way to set this up on Fedora Core 6.
First, you need FUSE, as well as the sshfs module. To do so, open up a command prompt, and do the following:
su - yum install fuse yum install fuse-sshfs usermod -G fuse youraccount
youraccount in the above with your user account. The last line adds you to the group
fuse, although if you are in other groups, it’ll remove you from them. You’d want to specify all additional groups you’d want to be in, e.g.
usermod -G fuse group1 group2 youraccount. If you’re logged in under your account, then you should log out and back in, so the group change takes effect.
Mount a Folder
Let’s say you want to create a mount point on your desktop so you can browse it. Do the following:
cd ~/Desktop mkdir remote_folder sshfs yourserver.someplace.not:/home/yourusername remote_folder
yourserver.someplace.not with the ssh server you want to mount. Replace
/home/yourusername with the remote folder you want to mount. If your local username differs from your remote username, you’ll have to specify it, e.g.
sshfs email@example.com:/home/yourremoteusername remote_folder
Once you do this, it should be all set — you can browse it from the desktop, and browse it from the command line, as if it were local.
Unmount a Folder
Unmounting is pretty simple; use
fusermount -u mountpoint. For instance, in the above, you mounted an ssh share to
~/Desktop/remote_folder. To unmount this, just issue:
fusermount -u ~/Desktop/remote_folder
That’s all there is to it!