<?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>only you &#187; key</title>
	<atom:link href="http://onlyn.info/tag/key/feed/" rel="self" type="application/rss+xml" />
	<link>http://onlyn.info</link>
	<description>你，一会看我，一会看云。 我觉得，你看我时很远，你看云时很近。</description>
	<lastBuildDate>Sun, 14 Aug 2011 15:39:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>制作不用密码可立即登入的 ssh 用户</title>
		<link>http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/</link>
		<comments>http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 14:32:48 +0000</pubDate>
		<dc:creator>coodar</dc:creator>
				<category><![CDATA[网络应用]]></category>
		<category><![CDATA[随感]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://onlyn.info/?p=163</guid>
		<description><![CDATA[<a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/" title="制作不用密码可立即登入的 ssh 用户"></a>如果在ubuntu下用ssh命令登录主机的话，总是会要求你输入密码，那么有什么法子可以不用密码直接登录呢？ 原先我用的是在主机cpanel的ssh-key manage里，先创建一个key，然后下载private key，放在ubuntu下的~/.ssh目录下，这样即可。 如图： 第二种方法就是在ubuntu本地创建key，然后上传到sever上。 首先，先在 Client 上面创建 Public Key 跟 Private Key 这两把钥匙，利用的指令为 ssh-keygen 这个命令；再来，将 Private Key 放在 Client 上面的家目录，亦即 $HOME/.ssh/ ， 并且修改权限为仅有该 User 可读的状态； 最后，将那把 Public Key 放在任何一个您想要用来登录的主机的 Server 端的某 User 的家目录内之 .ssh/ 里面的认证文件即可完成整个程序。 测试一下。输入 ssh test@linux。 &#8230;<p class="read-more"><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">继续阅读 &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/" title="制作不用密码可立即登入的 ssh 用户"></a><p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->如果在<span style="font-family: AR PL UMing CN,serif;">ubuntu</span>下用<span style="font-family: AR PL UMing CN,serif;">ssh</span>命令登录主机的话，总是会要求你输入密码，那么有什么法子可以不用密码直接登录呢？</p>
<p>原先我用的是在主机<span style="font-family: AR PL UMing CN,serif;">cpanel</span>的<span style="font-family: AR PL UMing CN,serif;">ssh-key manage</span>里，先创建一个<span style="font-family: AR PL UMing CN,serif;">key</span>，然后下载<span style="font-family: AR PL UMing CN,serif;">private key</span>，放在<span style="font-family: AR PL UMing CN,serif;">ubuntu</span>下的<span style="font-family: AR PL UMing CN,serif;">~/.ssh</span>目录下，这样即可。</p>
<p>如图：</p>
<p><a class="tt-flickr tt-flickr-Large" title="cpanel ssh" href="http://www.flickr.com/photos/coodar/4271703542/"><img class="alignnone" src="http://farm5.static.flickr.com/4016/4271703542_930df72ce5_o.png" alt="cpanel ssh" width="749" height="396" /></a></p>
<p>第二种方法就是在ubuntu本地创建key，然后上传到sever上。</p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<ol>
<li>首先，先在 <span style="font-family: AR PL UMing CN,serif;">Client </span>上面创建 <span style="font-family: AR PL UMing CN,serif;">Public Key </span>跟 	<span style="font-family: AR PL UMing CN,serif;">Private Key </span>这两把钥匙，利用的指令为 	<span style="font-family: AR PL UMing CN,serif;">ssh-keygen </span>这个命令；再来，将 <span style="font-family: AR PL UMing CN,serif;">Private 	Key </span>放在 <span style="font-family: AR PL UMing CN,serif;">Client </span>上面的家目录，亦即 <span style="font-family: AR PL UMing CN,serif;">$HOME/.ssh/ </span>， 并且修改权限为仅有该 <span style="font-family: AR PL UMing CN,serif;">User </span>可读的状态；
<p><a class="tt-flickr tt-flickr-Large" title="创建key" href="http://www.flickr.com/photos/coodar/4271704228/"><img class="alignnone" src="http://farm5.static.flickr.com/4061/4271704228_9aa6878cac_o.png" alt="创建key" width="616" height="350" /></a></li>
<li>最后，将那把 <span style="font-family: AR PL UMing CN,serif;">Public 	Key </span>放在任何一个您想要用来登录的主机的 	<span style="font-family: AR PL UMing CN,serif;">Server </span>端的某 <span style="font-family: AR PL UMing CN,serif;">User </span>的家目录内之 <span style="font-family: AR PL UMing CN,serif;">.ssh/ </span>里面的认证文件即可完成整个程序。<a class="tt-flickr tt-flickr-Large" title="上传公钥" href="http://www.flickr.com/photos/coodar/4271704446/"><img class="alignnone" src="http://farm3.static.flickr.com/2746/4271704446_0f0d181e42_o.png" alt="上传公钥" width="577" height="190" /></a></li>
<li>测试一下。输入 ssh test@linux。</li>
</ol>
<p>注释：test为你的id。test2是你的ubuntu机器名字。linux就是主机服务器地址了。上图中192.168.0.2是主机ip地址，写域名也行。</p>
<p>两种方法都可以，任选一个。如果你喜欢命令行就用第二种方法吧。呵呵。</p>
<p>可具体参考<a href="http://onlyn.info/zdc">鸟哥的linux私房菜</a>。</p>
<hr /><h2>Comments</h2><ul><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月13日</a>, <a href='http://zhaolianlin.com' rel='external nofollow' class='url'>JasonChao</a> writes: 图片都显示不出来，呵呵</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月13日</a>, <a href='http://obugs.net' rel='external nofollow' class='url'>第三眼</a> writes: 方法不错，图片需翻墙，flickr，哎</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月13日</a>, <a href='http://onlyn.info' rel='external nofollow' class='url'>coodar</a> writes: 哎，我一天到晚都是开着ssh的，谁知道flickr居然挂了。
万恶的gfw啊，我blog里所有图片都放在flickr上了。
难道真的要把图片放在国内？我怕哪天公司挂了，链接又失效。
难啊！</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月13日</a>, <a href='http://obugs.net' rel='external nofollow' class='url'>第三眼</a> writes: 除了flickr之外还有很多选择嘛，国外的会挂是必然的，这是大势所趋</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月13日</a>, <a href='http://onlyn.info' rel='external nofollow' class='url'>coodar</a> writes: 支持外链的不多阿。有啥推荐的吗？</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月14日</a>, <a href='http://joyla.srt24.idcwind.net/' rel='external nofollow' class='url'>joyla</a> writes: 这个我要学习！呵呵！</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月14日</a>, <a href='http://www.awuit.com' rel='external nofollow' class='url'>阿吴</a> writes: 我还可以看到图片</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月14日</a>, <a href='http://onlyn.info' rel='external nofollow' class='url'>coodar</a> writes: 可能是flickr又解封了。</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月14日</a>, <a href='http://obugs.net' rel='external nofollow' class='url'>第三眼</a> writes: photobucket 或者 tinypic</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月14日</a>, <a href='http://onlyn.info' rel='external nofollow' class='url'>coodar</a> writes: 不错，我之所以用flickr就是它的扩展性强点，wordpress有一个插件Flickr Photo Album很方便，可以直接调取flickr的图片插入post，就不用自己复制粘贴外链了。
现在可以考虑换换了。呵呵。</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月15日</a>, <a href='http://shuaige.me' rel='external nofollow' class='url'>ShuaiGe.Me</a> writes: Flickr，我们俩都杯具了。。</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月16日</a>, <a href='http://blog.zhengyuzhong.com' rel='external nofollow' class='url'>羽中</a> writes: flickr现在可以访问啊？只是外链被墙。。？SSH至今搞不懂是啥 - -</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月18日</a>, <a href='http://mulnim.com' rel='external nofollow' class='url'>mulnim</a> writes: ubuntu 到现在我还没玩转呢。。。</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月19日</a>, <a href='http://littlebear.dyndns.org' rel='external nofollow' class='url'>littlebear</a> writes: 不是自动加入的吗？ 怎么你弄的那么复杂啊？</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月19日</a>, <a href='http://onlyn.info' rel='external nofollow' class='url'>coodar</a> writes: 自动加入？连上ssh要嘛密码，要嘛key，只有这两种。</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月19日</a>, <a href='http://blog.okkey.net' rel='external nofollow' class='url'>Kada</a> writes: 博主对UBUNTU也有研究啊！</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月19日</a>, <a href='http://onlyn.info' rel='external nofollow' class='url'>coodar</a> writes: 正在用着呢。也谈不上研究。呵呵。</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月20日</a>, <a href='http://www.softjie.cn' rel='external nofollow' class='url'>popo</a> writes: 软件街前来围观</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月23日</a>, <a href='http://www.9sh.net' rel='external nofollow' class='url'>仁心博客</a> writes: 研究研究一下</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年01月25日</a>, <a href='http://onlyn.info' rel='external nofollow' class='url'>coodar</a> writes: ssh，简单的说就是一种安全的传输模式，gfw就不能拦截了，所以用作翻墙。
类似于https。</li><li><a href="http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/">2010年02月3日</a>, <a href='http://www.lokers.cn' rel='external nofollow' class='url'>loker</a> writes: 看不到图</li></ul><hr /><small>Copyright &copy; 2010<br /> 知识共享署名-非商业性使用-禁止演绎 注意：转载勿改标题！onlyn.info--rakugun's blog<br /> (Digital Fingerprint: 1ba59ab30894d0f79b8c2512199bf0bc)</small><br />
 欢迎关注<a href="http://twitter.com/coodar" title="我的微博">我的微博</a> 访问<a href="http://www.google.com/reader/shared/coodar" title="我的分享">我的分享</a>
]]></content:encoded>
			<wfw:commentRss>http://onlyn.info/2010/01/13/%e5%88%b6%e4%bd%9c%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e5%8f%af%e7%ab%8b%e5%8d%b3%e7%99%bb%e5%85%a5%e7%9a%84-ssh-%e7%94%a8%e6%88%b7/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

