<?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>How to Config &#187; OpenSSH</title>
	<atom:link href="http://www.howtoconfig.com/tag/openssh/feed" rel="self" type="application/rss+xml" />
	<link>http://www.howtoconfig.com</link>
	<description>how to config - how to configure</description>
	<lastBuildDate>Fri, 29 Apr 2011 09:52:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>SSH โดยไม่ต้องใส่รหัสผ่าน</title>
		<link>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html#comments</comments>
		<pubDate>Fri, 16 Jan 2009 12:30:01 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[*BSD]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[รหัสผ่าน]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=57</guid>
		<description><![CDATA[สำหรับผู้ดูแลระบบที่มีความจำเป็นต้องใช้งาน Remote Login ผ่าน OpenSSH Client อยู่เป็นประจำไม่ว่าจะใช้งานบน Linux, *BSD, Mac OS X คงจะเกิดอาการเบื่อไม่น้อยที่ต้องพิมพ์ Password ทุกๆ ครั้งที่ต้องการจะ Login (ไม่นับ Password จำพวก 123456 นะครับ) ทางออกสำหรับผู้ที่ต้องการ Login โดยไม่ต้องพิมพ์ Password แถมยังคงความปลอดภัยตามแบบฉบับของ OpenSSH สามารถทำได้ตามวิธีดังต่อไปนี้ครับ ระบบที่ทำการทดสอบ - OpenSSH Client บน Mac OS X 10.5.6 - OpenSSH Server บน Ubuntu 8.04 ขั้นตอนแรก ทำการสร้าง keys สำหรับยืนยันตัวตนระหว่าง Client และ Server (ทำบนเครื่อง Client ในที่นี้คือ Mac [...]]]></description>
			<content:encoded><![CDATA[<p>สำหรับผู้ดูแลระบบที่มีความจำเป็นต้องใช้งาน Remote Login ผ่าน OpenSSH Client อยู่เป็นประจำไม่ว่าจะใช้งานบน Linux, *BSD, Mac OS X คงจะเกิดอาการเบื่อไม่น้อยที่ต้องพิมพ์ Password ทุกๆ ครั้งที่ต้องการจะ Login (ไม่นับ Password จำพวก 123456 นะครับ) ทางออกสำหรับผู้ที่ต้องการ Login โดยไม่ต้องพิมพ์ Password แถมยังคงความปลอดภัยตามแบบฉบับของ OpenSSH สามารถทำได้ตามวิธีดังต่อไปนี้ครับ</p>
<p>ระบบที่ทำการทดสอบ<br />
- OpenSSH Client บน Mac OS X 10.5.6<br />
- OpenSSH Server บน Ubuntu 8.04</p>
<p>ขั้นตอนแรก ทำการสร้าง keys สำหรับยืนยันตัวตนระหว่าง Client และ Server (ทำบนเครื่อง Client ในที่นี้คือ Mac OS X)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> rsa</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/UserA/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/UserA/.ssh/id_rsa.
Your public key has been saved in /Users/UserA/.ssh/id_rsa.pub.
The key fingerprint is:
a4:74:0b:bc:2f:d1:f5:c7:4e:90:51:7f:f4:45:84:a0 UserA@MacClient</pre></div></div>

<p><span id="more-57"></span></p>
<p>ขั้นตอนต่อไป ใช้ ssh สร้าง directory ~/.ssh บน Server ปลายทาง (ทำบน Client ได้เลย โดยผ่าน ssh)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> .ssh</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh UserA@UbuntuServer mkdir -p .ssh
UserA@vmtuserver's password:</pre></div></div>

<p>ขั้นตอนสุดท้าย ทำการเพิ่ม Public keys ที่สร้างขึ้นในขั้นตอนแรกไปยังไฟล์ ~/.ssh/authorized_keys บน Server ปลายทาง (ทำบน Client โดยผ่าน ssh เช่นเคย)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">cat</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer <span style="color: #ff0000;">'cat &amp;gt;&amp;gt; .ssh/authorized_keys'</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ cat .ssh/id_rsa | ssh UserA@UbuntuServer 'cat &amp;gt;&amp;gt; .ssh/authorized_keys'
UserA@vmtuserver's password:</pre></div></div>

<p>ทำการทดสอบ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh UserA@UbuntuServer
Linux UbuntuServer 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686
&nbsp;
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
&nbsp;
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
&nbsp;
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
You have mail.
Last login: Tue Jan 13 00:14:19 2009 from MacClient
UserA@UbuntuServer:~$</pre></div></div>

<p>*สามารถเพิ่ม Public keys ที่สร้างขึ้นไปยัง User ใดๆ ก็ได้ ไม่จำเป็นต้องมีชื่อเหมือนกับ User ที่มีอยู่บน Client</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fssh-login-without-password.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

