diff options
author | Aaron Ball <nullspoon@iohq.net> | 2015-09-24 16:21:02 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2015-09-25 00:10:55 -0600 |
commit | 4c921d1dd9e16eb456da3e97d72aecb0881ff39d (patch) | |
tree | 7e66e633fbd643f239346aac2e299b8eb3d75bd5 /src/Remote_Mounting_File_Systems_Through_SSH.ascii | |
parent | 161a81152e7b644444dea3000165f436d16ce3f5 (diff) | |
download | oper.io-4c921d1dd9e16eb456da3e97d72aecb0881ff39d.tar.gz oper.io-4c921d1dd9e16eb456da3e97d72aecb0881ff39d.tar.xz |
Initial conversion to php
Wrote index.php
Moved all asciidoc source files into new src directory
Created index.ascii for keeping track of post index (and allow for
drafts easily)
Updated styles to allow for styles unique to the index page
Fixed a few issues with various posts
Added tracking code
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: |