<?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>梁剑的Blog &#187; ssh</title>
	<atom:link href="http://icomes.net/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://icomes.net</link>
	<description>做有趣的事，做有用的人</description>
	<lastBuildDate>Sat, 05 Nov 2011 18:23:06 +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 tunnel建立本地sock代理</title>
		<link>http://icomes.net/2009/07/25/%e5%88%a9%e7%94%a8ssh-tunnel%e5%bb%ba%e7%ab%8b%e6%9c%ac%e5%9c%b0sock%e4%bb%a3%e7%90%86/</link>
		<comments>http://icomes.net/2009/07/25/%e5%88%a9%e7%94%a8ssh-tunnel%e5%bb%ba%e7%ab%8b%e6%9c%ac%e5%9c%b0sock%e4%bb%a3%e7%90%86/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 06:59:48 +0000</pubDate>
		<dc:creator>梁剑</dc:creator>
				<category><![CDATA[技术笔记]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[代理]]></category>

		<guid isPermaLink="false">http://icomes.net/?p=415</guid>
		<description><![CDATA[每个人用Proxy的动机可能都不同，当然在这个最大的局域网内，最多应该是为了翻墙吧。 我的目的比较简单，希望有个固定IP可以访问家里的路由器，仅此而已。 需要的资源包括： 一个远程机器的ssh帐号。这个就各显神通了，实在没办法，推荐用unix-center。 装有FoxyProxy的Firefox。这是属于锦上添花的功能，方便切换。不过如果你一定要用IE，我也不会阻拦。 过程： 1. 执行ssh -Nf username@remoteserver.com -D 7070 这个命令会先和remoteserver.com建立一个ssh链接，然后打开本地的7070端口，以后所有对localhost:7070的访问都会转发到remoteserver.com。 前提当然是你在remoteserver.com上拥有username这个帐号。 -N 不执行远程命令 -f 后台执行ssh -D 动态绑定的意思 如果是在Windows下，可以用putty来建立ssh链接。 2. 配置FoxyProxy 不说废话了，贴图吧。如果习惯Tor的话，应该很简单。 3. 建立ssh的信任关系 这是为像我这样懒到不想每次都输密码的人准备的。 在本地执行ssh-keygen -t rsa，一路回车，会在本地生成一对公钥和私钥（通常在~/.ssh下） 将公钥copy到远程机器上的~/.ssh/authorized_keys里，scp或者复制/粘帖，随自己喜欢吧。 然后，就结束了。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Ubunt9.04终于发布了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F04%2F06%2Fubunt904%25E7%25BB%2588%25E4%25BA%258E%25E5%258F%2591%25E5%25B8%2583%25E4%25BA%2586%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015339.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Ubunt9.04终于发布了</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="阅读空间的GM脚本" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F01%2F17%2F%25E9%2598%2585%25E8%25AF%25BB%25E7%25A9%25BA%25E9%2597%25B4%25E7%259A%2584gs%25E8%2584%259A%25E6%259C%25AC%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015260.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">阅读空间的GM脚本</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用visio画的UML图例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F10%2F18%2F%25E7%2594%25A8visio%25E7%2594%25BB%25E7%259A%2584uml%25E5%259B%25BE%25E4%25BE%258B%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015128.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用visio画的UML图例</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="The Last Lecture" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2011%2F10%2F15%2Fthe-last-lecture%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/10/15/9228539.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">The Last Lecture</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>每个人用Proxy的动机可能都不同，当然在这个最大的局域网内，最多应该是为了翻墙吧。<br />
我的目的比较简单，希望有个固定IP可以访问家里的路由器，仅此而已。</p>
<p>需要的资源包括：<br />
一个远程机器的ssh帐号。这个就各显神通了，实在没办法，推荐用unix-center。<br />
装有FoxyProxy的Firefox。这是属于锦上添花的功能，方便切换。不过如果你一定要用IE，我也不会阻拦。</p>
<p>过程：<br />
1. 执行<em>ssh -Nf username@remoteserver.com -D 7070</em><br />
这个命令会先和remoteserver.com建立一个ssh链接，然后打开本地的7070端口，以后所有对localhost:7070的访问都会转发到remoteserver.com。<br />
前提当然是你在remoteserver.com上拥有username这个帐号。<br />
-N 不执行远程命令<br />
-f 后台执行ssh<br />
-D 动态绑定的意思<br />
如果是在Windows下，可以用putty来建立ssh链接。</p>
<p>2. 配置FoxyProxy<br />
不说废话了，贴图吧。如果习惯Tor的话，应该很简单。<br />
<a href="http://icomes.net/wp-content/uploads/2009/07/FoxyProxy.png"><img class="alignnone size-medium wp-image-416" title="FoxyProxy" src="http://icomes.net/wp-content/uploads/2009/07/FoxyProxy-300x200.png" alt="FoxyProxy" width="300" height="200" /></a></p>
<p>3. 建立ssh的信任关系<br />
这是为像我这样懒到不想每次都输密码的人准备的。<br />
在本地执行ssh-keygen -t rsa，一路回车，会在本地生成一对公钥和私钥（通常在~/.ssh下）<br />
将公钥copy到远程机器上的~/.ssh/authorized_keys里，scp或者复制/粘帖，随自己喜欢吧。<br />
然后，就结束了。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="3"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Ubuntu 8.04 Server在VMWare中无法启动的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2008%2F06%2F29%2Fubuntu-804-server%25E5%259C%25A8vmware%25E4%25B8%25AD%25E6%2597%25A0%25E6%25B3%2595%25E5%2590%25AF%25E5%258A%25A8%25E7%259A%2584%25E8%25A7%25A3%25E5%2586%25B3%25E5%258A%259E%25E6%25B3%2595%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15017346.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Ubuntu 8.04 Server在VMWare中无法启动的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Ubunt9.04终于发布了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F04%2F06%2Fubunt904%25E7%25BB%2588%25E4%25BA%258E%25E5%258F%2591%25E5%25B8%2583%25E4%25BA%2586%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015339.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Ubunt9.04终于发布了</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="浏览器战争" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F01%2F13%2F%25E6%25B5%258F%25E8%25A7%2588%25E5%2599%25A8%25E6%2588%2598%25E4%25BA%2589%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015466.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">浏览器战争</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="3" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://icomes.net/2009/07/25/%e5%88%a9%e7%94%a8ssh-tunnel%e5%bb%ba%e7%ab%8b%e6%9c%ac%e5%9c%b0sock%e4%bb%a3%e7%90%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>登录uc的脚本</title>
		<link>http://icomes.net/2009/07/14/%e7%99%bb%e5%bd%95uc%e7%9a%84%e8%84%9a%e6%9c%ac/</link>
		<comments>http://icomes.net/2009/07/14/%e7%99%bb%e5%bd%95uc%e7%9a%84%e8%84%9a%e6%9c%ac/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 15:47:26 +0000</pubDate>
		<dc:creator>梁剑</dc:creator>
				<category><![CDATA[技术笔记]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://icomes.net/?p=399</guid>
		<description><![CDATA[发现一个非常好的网站，可以提供免费的ssh服务，而且有多种OS可供选择。 创始人具有真正的开放分享的精神，这样的人多一点，中国才能变得更好吧。 他们现在需要帮助，看到 &#038; 有能力&#038; 认同的人，尽自己的一份力吧。 可以购买服务，也可以直接捐款。 www.unix-center.net #!/bin/sh &#160; servers=&#40;&#34;t1000.unix-center.net&#34; &#34;x4100.unix-center.net&#34; &#34;opensolaris.unix-center.net&#34; &#34;fedora.unix-center.net&#34; &#34;ubuntu.unix-center.net&#34; &#34;freebsd.unix-center.net&#34; &#34;aix.unix-center.net&#34;&#41; svrcnt=${#servers[@]} &#160; function go&#40;&#41; &#123; if &#91; $1 -ge $svrcnt &#93;; then echo &#34;server not exist&#34; exit fi echo &#34;going ${servers[$1]}&#34; ssh iver@${servers[$1]} &#125; &#160; if &#91; $# -eq 1 &#93;; then go $1 else echo &#34;Usage: $0 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Second Screenshot" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F09%2F03%2Fsecond-screensho%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015227.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Second Screenshot</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="The Last Lecture" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2011%2F10%2F15%2Fthe-last-lecture%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/10/15/9228539.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">The Last Lecture</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="利用ssh tunnel建立本地sock代理" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F07%2F25%2F%25E5%2588%25A9%25E7%2594%25A8ssh-tunnel%25E5%25BB%25BA%25E7%25AB%258B%25E6%259C%25AC%25E5%259C%25B0sock%25E4%25BB%25A3%25E7%2590%2586%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015597.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">利用ssh tunnel建立本地sock代理</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="什么是Nginx" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2011%2F02%2F24%2F%25E4%25BB%2580%25E4%25B9%2588%25E6%2598%25AFnginx%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15014208.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">什么是Nginx</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>发现一个非常好的网站，可以提供免费的ssh服务，而且有多种OS可供选择。<br />
创始人具有真正的开放分享的精神，这样的人多一点，中国才能变得更好吧。<br />
他们现在需要帮助，看到 &#038; 有能力&#038; 认同的人，尽自己的一份力吧。<br />
可以购买服务，也可以直接捐款。<br />
<a href="http://www.unix-center.net/" target="_blank">www.unix-center.net</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">servers</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;t1000.unix-center.net&quot;</span> <span style="color: #ff0000;">&quot;x4100.unix-center.net&quot;</span> <span style="color: #ff0000;">&quot;opensolaris.unix-center.net&quot;</span> <span style="color: #ff0000;">&quot;fedora.unix-center.net&quot;</span> <span style="color: #ff0000;">&quot;ubuntu.unix-center.net&quot;</span> <span style="color: #ff0000;">&quot;freebsd.unix-center.net&quot;</span> <span style="color: #ff0000;">&quot;aix.unix-center.net&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">svrcnt</span>=<span style="color: #800000;">${#servers[@]}</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> go<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$1</span> <span style="color: #660033;">-ge</span> <span style="color: #007800;">$svrcnt</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;server not exist&quot;</span>
		<span style="color: #7a0874; font-weight: bold;">exit</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;going <span style="color: #007800;">${servers[$1]}</span>&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">ssh</span> iver<span style="color: #000000; font-weight: bold;">@</span><span style="color: #800000;">${servers[$1]}</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	go <span style="color: #007800;">$1</span>
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: $0 target<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
	<span style="color: #007800;">i</span>=<span style="color: #000000;">0</span>
	<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$i</span> <span style="color: #660033;">-lt</span> <span style="color: #007800;">$svrcnt</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
	<span style="color: #000000; font-weight: bold;">do</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span><span style="color: #ff0000;">&quot;:&quot;</span> <span style="color: #800000;">${servers[$i]}</span>
		<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>i++<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Another Hello World is running on my iPhone!" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F08%2F30%2Fanother-hello-world-is-running-on-my-iphone%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015234.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Another Hello World is running on my iPhone!</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Ubuntu 8.04 Server在VMWare中无法启动的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2008%2F06%2F29%2Fubuntu-804-server%25E5%259C%25A8vmware%25E4%25B8%25AD%25E6%2597%25A0%25E6%25B3%2595%25E5%2590%25AF%25E5%258A%25A8%25E7%259A%2584%25E8%25A7%25A3%25E5%2586%25B3%25E5%258A%259E%25E6%25B3%2595%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15017346.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Ubuntu 8.04 Server在VMWare中无法启动的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Ubunt9.04终于发布了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2009%2F04%2F06%2Fubunt904%25E7%25BB%2588%25E4%25BA%258E%25E5%258F%2591%25E5%25B8%2583%25E4%25BA%2586%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15015339.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Ubunt9.04终于发布了</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="黄子华 – 娱乐圈血肉史2" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Ficomes.net%2F2011%2F01%2F22%2F%25E9%25BB%2584%25E5%25AD%2590%25E5%258D%258E-%25E5%25A8%25B1%25E4%25B9%2590%25E5%259C%2588%25E8%25A1%2580%25E8%2582%2589%25E5%258F%25B22%2F&from=http%3A%2F%2Ficomes.net%2F2009%2F07%2F14%2F%25E7%2599%25BB%25E5%25BD%2595uc%25E7%259A%2584%25E8%2584%259A%25E6%259C%25AC%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/29/15014211.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">黄子华 – 娱乐圈血肉史2</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://icomes.net/2009/07/14/%e7%99%bb%e5%bd%95uc%e7%9a%84%e8%84%9a%e6%9c%ac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

