<?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; key</title>
	<atom:link href="http://www.simplylinux.ch/tag/key/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simplylinux.ch</link>
	<description>Jeder kann Linux beherrschen lernen...</description>
	<lastBuildDate>Sat, 19 Nov 2011 17:37:37 +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>SSH Login ohne Passwort (Key-Based)</title>
		<link>http://www.simplylinux.ch/ssh-login-ohne-passwort-key-based</link>
		<comments>http://www.simplylinux.ch/ssh-login-ohne-passwort-key-based#comments</comments>
		<pubDate>Mon, 03 Nov 2008 19:15:17 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[Benutzer]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[key-based login]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=19</guid>
		<description><![CDATA[Die Verbindungsaufnahme mit SSH ohne Passwortabfrage ist denkbar einfach. Diese Methode kann dazu benutzt werden um unbedarfte Benutzer kein Passwort mitteilen zu müssen, dass die sich eh nicht merken können oder um sich selber das Leben einfacher zu machen oder um Services zu automatisieren, wie z.B. rsync über SSH. In vier einfach Schritten kann dies [...]]]></description>
			<content:encoded><![CDATA[<p>Die Verbindungsaufnahme mit SSH ohne Passwortabfrage ist denkbar einfach. Diese Methode kann dazu benutzt werden um unbedarfte Benutzer kein Passwort mitteilen zu müssen, dass die sich eh nicht merken können oder um sich selber das Leben einfacher zu machen oder um Services zu automatisieren, wie z.B. rsync über SSH.</p>
<p>In vier einfach Schritten kann dies erreicht werden!<br />
<span id="more-19"></span><br />
<strong>1. Schritt &#8211; Einführung</strong></p>
<p>Nachfolgend wird als &#8220;Client&#8221; der Computer bezeichnet, an dem ein Benutzer sitzt. &#8220;Server&#8221; ist der Computer, in den eingeloggt werden soll ohne Passwort über SSH und &#8220;User&#8221; ist der Benutzer mit dem man sich am Server anmeldet. Ohne key-based SSH würde das folgendermassen aussehen:</p>
<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">ssh</span> user<span class="sy0">@</span>server</pre></div></div>
<p>Dann kommt die Passwort Aufforderung.</p>
<p><strong>2. Kreieren des Public Key</strong></p>
<p>Auf dem Client muss folgender Befehl ausgeführt werden:</p>
<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="kw3">cd</span> ~<span class="sy0">/</span>.ssh
<span class="kw2">ssh-keygen</span> <span class="re5">-t</span> dsa</pre></div></div>
<p>Es kommt dann die Aufforderung, wo die Datei gespeichert werden soll und wie die Datei benannt werden soll. Es schlägt vor, die Datei als <em>~/.ssh/id_dsa</em> zu speichern. Sollte man das ändern, muss das natürlich in den nachfolgenden Schritten auch bedacht werden &#8211; insbesondere wird beim Aufbau der Verbindung standardmässig nur nach der id_dsa gesucht.</p>
<p><strong>3. Den Public Key auf dem Server hinzufügen</strong></p>
<p>Mit folgendem Befehl wird dann der Public Key auf den Server geladen. Dabei muss das Passwort des Users auf dem Server angegeben werden.</p>
<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;">ssh-copy-id <span class="re5">-i</span> .ssh<span class="sy0">/</span>id_dsa.pub user<span class="sy0">@</span>server</pre></div></div>
<p><strong>4. Zugriff auf den Server nehmen</strong></p>
<p>Nun kann ausprobiert werden, ob es geklappt hat:</p>
<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;"><span class="kw2">ssh</span> user<span class="sy0">@</span>server</pre></div></div>
<p>Hier dürfte jetzt keine Passwortabfrage mehr erscheinen. Falls dem so ist und sonst keine Fehlermeldung kommt, dann hat es geklappt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/ssh-login-ohne-passwort-key-based/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

