diff options
author | Aaron Ball <nullspoon@iohq.net> | 2015-05-31 14:42:19 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2015-05-31 14:42:19 -0600 |
commit | 1cae83d63794091ed5cc1248a39073a37979e571 (patch) | |
tree | 3d5c81fbbb65e9c7b66e021972c131a1ca41b507 /src/Remote_Mounting_File_Systems_Through_SSH.ascii | |
parent | bec251a94189864d08edbc162e3c046aa9d18d9c (diff) | |
download | oper.io-1cae83d63794091ed5cc1248a39073a37979e571.tar.gz oper.io-1cae83d63794091ed5cc1248a39073a37979e571.tar.xz |
More posts converted
Diffstat (limited to 'src/Remote_Mounting_File_Systems_Through_SSH.ascii')
-rw-r--r-- | src/Remote_Mounting_File_Systems_Through_SSH.ascii | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/Remote_Mounting_File_Systems_Through_SSH.ascii b/src/Remote_Mounting_File_Systems_Through_SSH.ascii new file mode 100644 index 0000000..958a377 --- /dev/null +++ b/src/Remote_Mounting_File_Systems_Through_SSH.ascii @@ -0,0 +1,69 @@ +Remote Mounting Filesystems Through SSH +======================================= +:author: Aaron Ball +:email: nullspoon@iohq.net + +Today I was wanting to edit a few image files on a remote machine. Now, when I +typically need to transfer files across the internet, I will transfer them +through sftp. I prefer this method simply because I already have an ssh server +running on my target machine, so I don't need to install anything extra (such +as ftp or samba). + +In light of this, I figured that since you can transfer files through an ssh +tunnel, you must be able to remotely mount a file system through ssh. + +Enter sshfs + +I searched around a bit and the first thing I found was sshfs (ssh file +system). It allows you to remotely mount files systems through ssh/fuse (yay). +<pre> apt-get install sshfs </pre> Before we get around to actually mounting +the remote filesystem, we need to change permissions on one thing so we can use +this as a non-root user since we don't run GUIs as root (at least I hope you +all don't). Let's add execute permissions for all to the fusermount command. + +---- +chmod +x /usr/bin/fusermount +---- + +Now that we have done that, we can proceed with mounting. I create a +mount location in my home directory for ease of access. + +---- +mkdir ~/mount +---- + +Now that we have a place to mount our remote location, +let's actually perform the dastardly deed. + +---- +sshfs <username>@<RemoteServer>:<RemotePath> <LocalMountPoint> +---- + +A good example of this is + +---- +sshfs jimneycricket@nowhereissomewhere:/home/jimneycricket ~/mount +---- + +It will ask you for a password. Supply the password and all should be well. +Open up your file manager and navigate to \~/mount and you should see the files +on your remote server (in this case, the home directory for jimneycricket). + +To unmount, you need to log in as root/sudo and run umount \~/mount. + +Finally, if you change the ports that ssh listens to on all of your ssh +servers, you need to add one extra bit to the sshfs string. To connect to a +port other than the default 22, put + +---- +-p <port> +---- + +just after sshfs and you'll be set. + +Yay for seamless mounting! + +Category:Linux + + +// vim: set syntax=asciidoc: |