<?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>Linux für alle &#187; sshfs</title>
	<atom:link href="http://www.simplylinux.ch/tag/sshfs/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simplylinux.ch</link>
	<description>Jeder kann Linux beherrschen lernen...</description>
	<lastBuildDate>Thu, 08 Jul 2010 08:37:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SSHFS &#8211; einfach gemacht</title>
		<link>http://www.simplylinux.ch/sshfs-einfach-gemacht</link>
		<comments>http://www.simplylinux.ch/sshfs-einfach-gemacht#comments</comments>
		<pubDate>Fri, 13 Nov 2009 10:41:14 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshfs]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=219</guid>
		<description><![CDATA[Ich hatte lange für meinen Heimserver einfach nur Samba resp. Cifs gebraucht. Allerdings hatte ich damit ein kleines Problem. Vorallem wenn ich .torrent Dateien runtergeladen habe und die in ein Verzeichnis auf meinem Desktop gespeichert hatte, welches an sich nur ein Symlink zu einem via cifs gemounteten Verzeichnis war, dann hatte rtorrent die Datei nicht [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hatte lange für meinen Heimserver einfach nur Samba resp. Cifs gebraucht. Allerdings hatte ich damit ein kleines Problem. Vorallem wenn ich .torrent Dateien runtergeladen habe und die in ein Verzeichnis auf meinem Desktop gespeichert hatte, welches an sich nur ein Symlink zu einem via cifs gemounteten Verzeichnis war, dann hatte rtorrent die Datei nicht akzeptiert, weil sie korrupt sei.<br />
<span id="more-219"></span><br />
Der Grund wieso ich immer cifs und nicht sshfs genommen habe war,  das ich mir ein kleines &#8220;start.sh&#8221; Script gebastelt habe, welches ein paar Dinge erledigt (e.g. Networkshare mounten, Programme starten, &#8230;). Ich wollte dies also ohne Probleme einfach ausführen lassen.</p>
<p>Das Ganze ist aber auch möglich über SSHFS:</p>
<p>(1) Keybased Login einrichten.<br />
Zuerst muss ein Keybased Login eingereichtet werden, ansonsten gibt es immer die Aufforderung. Ein kleines Howto diesbezüglich gibt es hier: http://www.simplylinux.ch/ssh-login-ohne-passwort-key-based<br />
Natürlich muss auf dem Server zuerst ein SSH Server installiert werden:<br />
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> openssh-server</pre></div></div></p>
<p>(2) SSHFS installieren<br />
Damit ich dann via SSHFS mounten kann, muss ich auf dem lokalen Client das entsprechende Paket installiert haben:<br />
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> sshfs</pre></div></div></p>
<p>(3) Manuel mounten<br />
Jetzt kann einfach ein Serververzeichnis in den lokalen Client mounten mit folgendem Befehl:<br />
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">sshfs user<span class="sy0">@</span>host:directory mountpoint</pre></div></div><br />
Wird kein (Server) Verzeichnis (=directory) angegeben, dann wird einfach das Home-Verzeichnis des Benutzers geladen. Wichtig ist hierbei, dass der (lokale) Mountpoint auch existieren muss und dass der entsprechende Benutzer auch Lese-/Schreibrecht hat. Bin mir nicht sicher ob auch Ausführrechte vorhanden sein müssen. Bei mir sind sowohl Benutzer- und Gruppenowner jeweils ich und die Permissions liegen be 0755.</p>
<p>Hier ein &#8220;echtes&#8221; Beispiel:<br />
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">sshfs charly<span class="sy0">@</span>charly11111.dyndns.org:<span class="sy0">/</span>media<span class="sy0">/</span>Audio <span class="sy0">/</span>media<span class="sy0">/</span>Audio</pre></div></div></p>
<p>Jetzt kann man sich damit entsprechend ein Bash Script anlegen wo dann alles gemountet wird.</p>
<p>(4) Unmounten<br />
Um die gemounteten Verzeichnis wieder loszuwerden, kann einfach folgender Befehl ausgeführt werden:<br />
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">fusermount <span class="re5">-u</span> <span class="sy0">/</span>path<span class="sy0">/</span>to<span class="sy0">/</span>mountpoint</pre></div></div></p>
<p>(5) fstab einrichten<br />
Natürlich können auch Einträge in der fstab gemacht werden. Diese sehen dann so aus:<br />
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="java" style="font-family:monospace;">sshfs#user@host<span class="sy0">:</span>directory mountpoint fuse user <span class="nu0">0</span> <span class="nu0">0</span></pre></div></div><br />
Um danach ein Eintrag zu mounten muss nur noch folgendes ausgeführt werden:<br />
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">mount</span> <span class="sy0">/</span>path<span class="sy0">/</span>to<span class="sy0">/</span>mountpoint</pre></div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/sshfs-einfach-gemacht/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
