<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WiredRevolution.com &#187; Samba</title>
	<atom:link href="http://www.wiredrevolution.com/tag/samba/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiredrevolution.com</link>
	<description>A Bit of Linux Wisdom</description>
	<lastBuildDate>Wed, 18 Jan 2012 22:45:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Share a remote filesystem over SSH</title>
		<link>http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=share-a-remote-filesystem-over-ssh</link>
		<comments>http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh#comments</comments>
		<pubDate>Wed, 25 Mar 2009 12:25:24 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[/etc/fstab]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[emerge]]></category>
		<category><![CDATA[fusermount]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[remote filesystem]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[shared filesystem]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSHFS]]></category>
		<category><![CDATA[sshfs-fuse]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=1028</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/>You may already be familiar with NFS and Samba for sharing files over a network. While these are both great distributed filesystem solutions, they require extra configuration and setup overhead in order to get them to work. If you want quick and easy access to a remote filesystem then SSHFS may be your best shot. [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp' rel='bookmark' title='Permanent Link: Securely copy remote files with scp'>Securely copy remote files with scp</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/mount-a-virtualbox-shared-folder-inside-a-guest-vm' rel='bookmark' title='Permanent Link: Mount a VirtualBox shared folder inside a guest VM'>Mount a VirtualBox shared folder inside a guest VM</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/how-to-mount-an-iso-disk-image' rel='bookmark' title='Permanent Link: How to mount an ISO disk image'>How to mount an ISO disk image</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/><p>You may already be familiar with <strong>NFS</strong> and <strong>Samba</strong> for sharing files over a network. While these are both great distributed filesystem solutions, they require extra configuration and setup overhead in order to get them to work. If you want quick and easy access to a remote filesystem then <strong>SSHFS</strong> may be your best shot.</p>
<p>SSHFS (Secure SHell FileSystem) is a file system for Linux capable of operating on files on a remote computer using just a secure shell login. It is based on sftp (SSH File Transfer Protocol).  Setup is easy on the server side, since most servers support SSH out of the box there is nothing to do.  On the client side, mounting the filesystem is as easy as logging in with SSH. The end user can seamlessly and securely interact with remote files as if they were local to your machine.</p>
<p><strong>Advantages of SSHFS over NFS/Samba</strong>:</p>
<ul>
<li>Utilizes SSH and is therefore very secure.</li>
<li>Allows secure access to remote filesystems outside of your local network.</li>
<li>Requires no special configuration on the server side.</li>
</ul>
<p><strong>Disadvantages</strong>:</p>
<ul>
<li>Slightly slower, although the difference is fairly small.</li>
<li>Does not show filesystem usage statistics.</li>
<li>Requires a user account on the server side.</li>
<li>Not a true distributed file system, single point to point sharing.</li>
</ul>
<p>
<h3>Setup</h3>
<p></p>
<p>The first step is to install SSHFS.</p>
<p>In Ubuntu:</p>
<pre>
$ sudo apt-get install sshfs
</pre>
<p>or in Gentoo:</p>
<pre>
$ sudo emerge -av sshfs-fuse
</pre>
<p>Create the mount point on your local machine. This is where you are going to access the remote filesystem.</p>
<pre>
$ sudo mkdir /mnt/share
</pre>
<p>Your user must have permission to access this mountpoint.</p>
<pre>
$ sudo chown ryan /mnt/share
</pre>
<p>
<h3>Start Sharing</h3>
<p></p>
<p>Now use the sshfs command to mount the remote filesystem. If the username is different on the server you are connecting, use the &#8220;username@host:&#8221; format, otherwise you can simply specify &#8220;host:&#8221;. </p>
<pre>
$ sshfs ryan@fileserver:/remote/share /mnt/share
</pre>
<p>If you are not using keys with SSH you will be prompted for a password.</p>
<pre>
ryan@fileserver's password:
</pre>
<p>Once you are finished you can easily unmount the filesystem.</p>
<p>as regular user:</p>
<pre>
$ fusermount -u /mnt/share
</pre>
<p>or as root:</p>
<pre>
$ sudo umount /mnt/share
</pre>
<p>
<h3>Configuration</h3>
<p></p>
<p>You can add an entry for this share to <strong>/etc/fstab</strong> to make the mounting process more seamless.</p>
<pre>
sshfs#ryan@fileserver:/remote/share /mnt/share fuse user,noauto 0 0
</pre>
<p><strong>user</strong> &#8211; allow any user to mount this share.<br />
<strong>noauto</strong> &#8211; stop the shared directory from being automatically mounted at startup. </p>
<p>If you want it automatically mounted, ensure that your SSH configuration uses keys and not passwords so it doesn&#8217;t ask for a password at startup. Once keys are in use you can safely remove the noauto option.</p>
<p>With fstab updated you can now mount the share as a normal user with this simple mount command. Again, if ssh is configured to use passwords you will still be prompted for one.</p>
<pre>
$ mount /mnt/share
</pre>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp' rel='bookmark' title='Permanent Link: Securely copy remote files with scp'>Securely copy remote files with scp</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/mount-a-virtualbox-shared-folder-inside-a-guest-vm' rel='bookmark' title='Permanent Link: Mount a VirtualBox shared folder inside a guest VM'>Mount a VirtualBox shared folder inside a guest VM</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/how-to-mount-an-iso-disk-image' rel='bookmark' title='Permanent Link: How to mount an ISO disk image'>How to mount an ISO disk image</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

