<?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>polaris14551 &#124; 摇光 &#187; ssh</title>
	<atom:link href="http://14551.org/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://14551.org</link>
	<description>一路向北，一個我從未觸及的花開之地. 亦或是哀鴻遍野…..未知的美丽</description>
	<lastBuildDate>Thu, 09 Sep 2010 11:48:52 +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>在CentOS上安装Openvpn</title>
		<link>http://14551.org/2010/09/install-openvpn-on-centos.html</link>
		<comments>http://14551.org/2010/09/install-openvpn-on-centos.html#comments</comments>
		<pubDate>Wed, 01 Sep 2010 14:18:37 +0000</pubDate>
		<dc:creator>摇光</dc:creator>
				<category><![CDATA[收藏分享]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://14551.org/?p=11326</guid>
		<description><![CDATA[折腾了几个小时终于成功连接了。
OpenVPN需要TUN支持，可以通过该命令确认：

cat /dev/net/tun

返回信息为：cat: /dev/net/tun: File descriptor in bad state  则OK
确认iptables_nat模块，可以通过该命令确认：

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE

返回信息为：iptables: Unknown error 4294967295  则OK

通过yum安装Openvpn：

yum -y install openvpn

拷贝相关文件至/etc/openvpn/目录：

cp -R /usr/share/openvpn/easy-rsa /etc/openvpn/

生成证书，在目录/etc/openvpn/easy-rsa/2.0：
1. 修改vars，保存后运行 ./vars：

export KEY_COUNTRY=&#34;CN&#34;
export KEY_PROVINCE=&#34;SH&#34;
export KEY_CITY=&#34;SHANGHAI&#34;
export KEY_ORG=&#34;14551.ORG&#34;
export KEY_EMAIL=&#34;WEBMASTER@14551.ORG&#34;

2. 生成相关证书（提示输入的地方 “回车”即可，以及会有两次确认“Y”）：

./build-ca server 创建证书颁发机构。
./build-key-server server  //服务器证书。
./build-key polarisclient //生成客户端证书。（红色部分自定义）
./build-dh  //生成Diffie Hellman参数。

3. 配置Openvpn：
在/etc/openvpn/目录新建 server.conf 文件，内容如下（这里使用的DNS是google public dns）：

port [...]]]></description>
			<content:encoded><![CDATA[<p>折腾了几个小时终于成功连接了。<br />
OpenVPN需要TUN支持，可以通过该命令确认：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">cat /dev/net/tun</pre></div></div>

<p>返回信息为：cat: /dev/net/tun: File descriptor in bad state  则OK<br />
确认iptables_nat模块，可以通过该命令确认：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE</pre></div></div>

<p>返回信息为：iptables: Unknown error 4294967295  则OK<br />
<span id="more-11326"></span><br />
通过yum安装Openvpn：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">yum -y install openvpn</pre></div></div>

<p>拷贝相关文件至/etc/openvpn/目录：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">cp -R /usr/share/openvpn/easy-rsa /etc/openvpn/</pre></div></div>

<p>生成证书，在目录/etc/openvpn/easy-rsa/2.0：<br />
1. 修改vars，保存后运行 ./vars：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">export KEY_COUNTRY=&quot;CN&quot;
export KEY_PROVINCE=&quot;SH&quot;
export KEY_CITY=&quot;SHANGHAI&quot;
export KEY_ORG=&quot;14551.ORG&quot;
export KEY_EMAIL=&quot;WEBMASTER@14551.ORG&quot;</pre></div></div>

<p>2. 生成相关证书（提示输入的地方 “回车”即可，以及会有两次确认“Y”）：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">./build-ca server 创建证书颁发机构。
./build-key-server server  //服务器证书。
./build-key polarisclient //生成客户端证书。（红色部分自定义）
./build-dh  //生成Diffie Hellman参数。</pre></div></div>

<p>3. 配置Openvpn：<br />
在/etc/openvpn/目录新建 server.conf 文件，内容如下（这里使用的DNS是google public dns）：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">port 443
proto tcp
dev tun
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
push &quot;redirect-gateway def1&quot;
push &quot;dhcp-option DNS 8.8.8.8&quot;
push &quot;dhcp-option DNS 8.8.4.4&quot;
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3</pre></div></div>

<p>4. 允许客户端通过VPN Server访问Internet：<br />
执行（红色部分换成VPS的IP地址）</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to-source 184.82.11.11</pre></div></div>

<p>执行 /etc/init.d/iptables save  保存设置<br />
执行 /etc/init.d/iptables restart  重启iptables<br />
编辑 /etc/sysctl.conf   net.ipv4.ip_forward = 0改为net.ipv4.ip_forward = 1。<br />
5. 将Openvpn服务加入开机自动启动：<br />
修改 /etc/rc.local  加入  /usr/sbin/openvpn &#8211;config /etc/openvpn/server.conf &amp;<br />
6. 客户端设置：<br />
下载客户端证书：/etc/openvpn/easy-rsa/2.0/keys  ca.key  polarisclient.crt  polarisclient.key<br />
下载Openvpn软件（windows）：http://openvpn.net/release/openvpn-2.1.0-install.exe<br />
配置ovpn文件：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">client
dev tun
proto tcp
remote  184.82.11.11 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert  polarisclient.crt
key  polarisclient.key
ns-cert-type server
comp-lzo
verb 3</pre></div></div>


	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://14551.org/2010/04/vps-squad.html" title="继续说VPS使用经历 (2010-04-23)">继续说VPS使用经历</a></li>
	<li><a href="http://14551.org/2009/09/exchange-server-quickly.html" title="快速网站转移 (2009-09-24)">快速网站转移</a></li>
	<li><a href="http://14551.org/2009/11/2009-11-01.html" title="北京下雪了 (2009-11-01)">北京下雪了</a></li>
	<li><a href="http://14551.org/2010/03/ssh-0324.html" title="分享 SSH 帐号 0324 (2010-03-24)">分享 SSH 帐号 0324</a></li>
	<li><a href="http://14551.org/2009/09/apt-get-install-build-essential.html" title="为Ubuntu安装编译环境 (2009-09-25)">为Ubuntu安装编译环境</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://14551.org/2010/09/install-openvpn-on-centos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu下，使用SSH帐号代理访问（2）</title>
		<link>http://14551.org/2010/07/ubuntu-ssh-proxy-plink.html</link>
		<comments>http://14551.org/2010/07/ubuntu-ssh-proxy-plink.html#comments</comments>
		<pubDate>Wed, 28 Jul 2010 10:13:00 +0000</pubDate>
		<dc:creator>摇光</dc:creator>
				<category><![CDATA[收藏分享]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://14551.org/?p=8019</guid>
		<description><![CDATA[之前方式是这样的，在桌面上创建一个启动器，在命令框中输入：ssh -D 7070 -qfnN   username@hostname，每次开机，双击启动器输入用户名密码连接。其实也不是很烦，只不过每次都需要输密码。
有一个工具叫Plink，可以免去输密码过程，由于是明文的，不是很安全。
1. 安装 Plink：sudo apt-get install putty-tools
2. 同样创建启动器：在命令框中输入，plink -N -v username@hostip -D 127.0.0.1:7070 -pw password
用这个方法，每次开机只要双击就OK了，除了不安全之外，双击看不到反应，只能靠翻翻石墙来验证是否连接成功。
还有更多的方法参考。
另外，如果需要SSH帐号，可以上淘宝。

	相关日志
	
	ZT:最小化权限的ssh账号-只能使用TCP转发
	wget 命令用法详解
	Ubuntu下，使用SSH帐号代理访问
	SSH已开通。
	转载：Ubuntu8.04安装配置大全


]]></description>
			<content:encoded><![CDATA[<p>之前方式是这样的，在桌面上创建一个启动器，在命令框中输入：ssh -D 7070 -qfnN   username@hostname，每次开机，双击启动器输入用户名密码连接。其实也不是很烦，只不过每次都需要输密码。</p>
<p>有一个工具叫Plink，可以免去输密码过程，由于是明文的，不是很安全。<br />
1. 安装 Plink：sudo apt-get install putty-tools<br />
2. 同样创建启动器：在命令框中输入，plink -N -v username@hostip -D 127.0.0.1:7070 -pw password<br />
用这个方法，每次开机只要双击就OK了，除了不安全之外，双击看不到反应，只能靠翻翻石墙来验证是否连接成功。</p>
<p>还有更多的方法<a href="http://wiki.wowubuntu.com/blog/ubuntu_ssh_tunneling">参考</a>。<br />
另外，如果需要SSH帐号，可以上<a href="http://search.taobao.com/search?q=ssh+%B4%FA%C0%ED&#038;commend=all&#038;ssid=s5-e-p1&#038;sort=price-asc">淘宝</a>。</p>

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://14551.org/2010/02/create-tunnel-user.html" title="ZT:最小化权限的ssh账号-只能使用TCP转发 (2010-02-22)">ZT:最小化权限的ssh账号-只能使用TCP转发</a></li>
	<li><a href="http://14551.org/2009/09/wget-command-usage.html" title="wget 命令用法详解 (2009-09-26)">wget 命令用法详解</a></li>
	<li><a href="http://14551.org/2009/12/ubuntu-ssh-proxy.html" title="Ubuntu下，使用SSH帐号代理访问 (2009-12-16)">Ubuntu下，使用SSH帐号代理访问</a></li>
	<li><a href="http://14551.org/2009/05/ssh.html" title="SSH已开通。 (2009-05-01)">SSH已开通。</a></li>
	<li><a href="http://14551.org/2009/04/ubuntu-virtualbox.html" title="转载：Ubuntu8.04安装配置大全 (2009-04-07)">转载：Ubuntu8.04安装配置大全</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://14551.org/2010/07/ubuntu-ssh-proxy-plink.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>分享 SSH 帐号 0324</title>
		<link>http://14551.org/2010/03/ssh-0324.html</link>
		<comments>http://14551.org/2010/03/ssh-0324.html#comments</comments>
		<pubDate>Wed, 24 Mar 2010 13:46:50 +0000</pubDate>
		<dc:creator>摇光</dc:creator>
				<category><![CDATA[不明白]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://14551.org/?p=2541</guid>
		<description><![CDATA[Google走了，政治，不懂也不想懂。
我只是喜欢使用Google的服务。
听说：Google一个月前宣布了一项计划，叫“Google Fiber for Communities”，内容是在美国挑选一个地区，合作架设光纤网路，光纤直通用户，提供每秒1G的巨大流量，目的是看高速网络会对社区造成什么样的影响，同时实验更先进的网络应用。
张朝阳称：“微博已经是一个标配了，我们必须得做，这不是什么大的东西，必须得有。” &#8211;哪个产品不是中国门户的标配呢？
独立BSP&#8211;门户开始做博客。
独立SNS&#8211;门户走向SNS。
独立微博&#8211;门户开始做微博。
创业者们身先士卒，培育环境，而黄雀就在那呢！当然这还跟民众的基本素质有关系，毕竟我们还处于社会主义初级阶段嘛。

回归正题：
买了个便宜的VPS，速度不快，适合急用，仅用来穿越，分享给大家。
服务器：ssh.7prs.net  密码：420
帐户1：kenengba.com （我想，捍卫自由的感觉不错）
帐户2：google.com
帐户3：animetaste.net  （好朋友分享动画）
帐户4：twitter.com
帐户5：wordpress.org
建议：尽量不要视频，可急用。
注意：有效期20天。

	相关日志
	
	通稿则一定要保存。
	追一次潮 google chrome~~
	转：Gtalk机器人帐号大全
	说不明白。
	落陷井，不一引手救，反挤之


]]></description>
			<content:encoded><![CDATA[<p>Google走了，政治，不懂也不想懂。<br />
我只是喜欢使用Google的服务。<br />
听说：<a href="http://houxi.net/isay/201">Google一个月前宣布了一项计划，叫“Google Fiber for Communities”，内容是在美国挑选一个地区，合作架设光纤网路，光纤直通用户，提供每秒1G的巨大流量，目的是看高速网络会对社区造成什么样的影响，同时实验更先进的网络应用。</a><br />
<a href="http://www.techweb.com.cn/news/2010-03-24/565282.shtml">张朝阳称：“微博已经是一个标配了，我们必须得做，这不是什么大的东西，必须得有。” </a>&#8211;哪个产品不是中国门户的标配呢？<br />
独立BSP&#8211;门户开始做博客。<br />
独立SNS&#8211;门户走向SNS。<br />
独立微博&#8211;门户开始做微博。<br />
创业者们身先士卒，培育环境，而黄雀就在那呢！当然这还跟民众的基本素质有关系，毕竟我们还处于社会主义初级阶段嘛。<br />
<span id="more-2541"></span><br />
回归正题：<br />
买了个便宜的VPS，速度不快，适合急用，仅用来穿越，分享给大家。<br />
服务器：ssh.7prs.net  密码：420<br />
帐户1：kenengba.com （我想，捍卫自由的感觉不错）<br />
帐户2：google.com<br />
帐户3：animetaste.net  （好朋友分享动画）<br />
帐户4：twitter.com<br />
帐户5：wordpress.org</p>
<p>建议：尽量不要视频，可急用。<br />
注意：有效期20天。</p>

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://14551.org/2009/07/weinai-google.html" title="通稿则一定要保存。 (2009-07-07)">通稿则一定要保存。</a></li>
	<li><a href="http://14551.org/2008/09/google-chrome.html" title="追一次潮 google chrome~~ (2008-09-03)">追一次潮 google chrome~~</a></li>
	<li><a href="http://14551.org/2008/09/gtalk-robot.html" title="转：Gtalk机器人帐号大全 (2008-09-17)">转：Gtalk机器人帐号大全</a></li>
	<li><a href="http://14551.org/2009/04/only-for-me.html" title="说不明白。 (2009-04-20)">说不明白。</a></li>
	<li><a href="http://14551.org/2008/11/kick-a-man-when-he-is-down.html" title="落陷井，不一引手救，反挤之 (2008-11-20)">落陷井，不一引手救，反挤之</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://14551.org/2010/03/ssh-0324.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>ZT:最小化权限的ssh账号-只能使用TCP转发</title>
		<link>http://14551.org/2010/02/create-tunnel-user.html</link>
		<comments>http://14551.org/2010/02/create-tunnel-user.html#comments</comments>
		<pubDate>Mon, 22 Feb 2010 14:10:20 +0000</pubDate>
		<dc:creator>摇光</dc:creator>
				<category><![CDATA[收藏分享]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[useradd]]></category>

		<guid isPermaLink="false">http://14551.org/?p=2463</guid>
		<description><![CDATA[感谢老曹，本文原址：http://www.bsdmap.com/2010/02/22/create-tunnel-user/
建立只能使用ssh“转发”功能的系统账户
为了满足“翻墙”的需要，在国外的Linux主机上（比如 DreamHost ）上建个可 ssh登录的用户，使用 ssh 的 Tunnel  来作代理是十分常见的方法。
但是主人往往又想最小化用户权限，以避免对系统造成影响。最简单的办法就是，禁止用户登录。
其实 ssh 可以连接到 sshd 但是不执行远程命令（默认是启动用户设定的 shell ），使用 -N 参数即可。
在服务器上建一个 username ：
添加用户：useradd -s /bin/false   username，将用户的shell设置成/bin/false。这样用户就无法与系统进行交互。
设置密码：passwd username
（对已有帐号禁止其shell交互使用：usermod -s /bin/false username）

小技巧：
也可以使用 /usr/bin/passwd 作为用户的 shell ，这样用户就可以通过登录而来自主修改密码。需要注意的是，需要将  /usr/bin/passwd 这一行写进 /etc/shells文件。
sshd 认证通后之后，会检查设定的 shell 是否登记在 /etc/shells  文件中，若已经登记，则fork自己，然后fork出来的子进程再exec 设定的 shell 。而 ssh 的 -N 参数，则是告诉 sshd  不需要执行 shell。
建立Tunnel：
ssh -D 1080 -qfnN    [...]]]></description>
			<content:encoded><![CDATA[<p>感谢老曹，本文原址：<a href="http://www.bsdmap.com/2010/02/22/create-tunnel-user/">http://www.bsdmap.com/2010/02/22/create-tunnel-user/</a></p>
<h1>建立只能使用ssh“转发”功能的系统账户</h1>
<p>为了满足“翻墙”的需要，在国外的<a href="http://14551.org/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">Linux</a>主机上（比如 DreamHost ）上建个可 ssh登录的用户，使用 ssh 的 Tunnel  来作代理是十分常见的方法。</p>
<p>但是主人往往又想最小化用户权限，以避免对系统造成影响。最简单的办法就是，禁止用户登录。</p>
<p>其实 ssh 可以连接到 sshd 但是不执行远程命令（默认是启动用户设定的 shell ），使用 -N 参数即可。</p>
<p>在服务器上建一个 username ：<br />
添加用户：useradd -s /bin/false   username，将用户的shell设置成/bin/false。这样用户就无法与系统进行交互。<br />
设置密码：passwd username<br />
（对已有帐号禁止其shell交互使用：usermod -s /bin/false username）<br />
<span id="more-2463"></span><br />
小技巧：<br />
也可以使用 /usr/bin/passwd 作为用户的 shell ，这样用户就可以通过登录而来自主修改密码。需要注意的是，需要将  /usr/bin/passwd 这一行写进 /etc/shells文件。<br />
sshd 认证通后之后，会检查设定的 shell 是否登记在 /etc/shells  文件中，若已经登记，则fork自己，然后fork出来的子进程再exec 设定的 shell 。而 ssh 的 -N 参数，则是告诉 sshd  不需要执行 shell。</p>
<p>建立Tunnel：</p>
<p>ssh -D 1080 -qfnN    username@hostname</p>
<p>输入密码即可使用（也可以用key认证）。</p>
<p>Windows的话，可以使用<a onclick="javascript:pageTracker._trackPageview('/outgoing/www.chiark.greenend.org.uk/~sgtatham/putty/download.html');" href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html" target="_blank">plink.exe</a>或者<a onclick="javascript:pageTracker._trackPageview('/outgoing/nemesis2.qx.net/pages/MyEnTunnel');" href="http://nemesis2.qx.net/pages/MyEnTunnel" target="_blank">MyEnTunnel</a>（MyEnTunnel  本质上也是使用plink.exe来建立Tunnel）。</p>
<p>此时账号username 可以通过sshd的认证使用 TcpForwarding ，但是不能运行  shell，不能与系统交互。刚好可以用来为朋友提供国外的代理翻墙。</p>
<p>参数详解：<br />
-D 1080 建立动态Tunnel，监听在本地1080端口。<br />
-q  安静模式。<br />
-f   ssh在后台运行，即认证之后，ssh退居后台。<br />
-n  将 stdio 重定向到 /dev/null，与-f配合使用。<br />
-N  不运行远程程序。即通知 sshd 不运行设定的 shell。</p>

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://14551.org/2010/02/useradd.html" title="ZT：在Linux系统中，批量添加用户实例 (2010-02-23)">ZT：在Linux系统中，批量添加用户实例</a></li>
	<li><a href="http://14551.org/2009/09/wget-command-usage.html" title="wget 命令用法详解 (2009-09-26)">wget 命令用法详解</a></li>
	<li><a href="http://14551.org/2010/07/ubuntu-ssh-proxy-plink.html" title="Ubuntu下，使用SSH帐号代理访问（2） (2010-07-28)">Ubuntu下，使用SSH帐号代理访问（2）</a></li>
	<li><a href="http://14551.org/2009/12/ubuntu-ssh-proxy.html" title="Ubuntu下，使用SSH帐号代理访问 (2009-12-16)">Ubuntu下，使用SSH帐号代理访问</a></li>
	<li><a href="http://14551.org/2009/05/ssh.html" title="SSH已开通。 (2009-05-01)">SSH已开通。</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://14551.org/2010/02/create-tunnel-user.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu下，使用SSH帐号代理访问</title>
		<link>http://14551.org/2009/12/ubuntu-ssh-proxy.html</link>
		<comments>http://14551.org/2009/12/ubuntu-ssh-proxy.html#comments</comments>
		<pubDate>Wed, 16 Dec 2009 15:36:51 +0000</pubDate>
		<dc:creator>摇光</dc:creator>
				<category><![CDATA[生活记事]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://14551.org/?p=2164</guid>
		<description><![CDATA[Win7到期，也无法使用slmgr.vbs /rearm命令，系统提示只能再次重装才行。想了想干脆试用一段Ubuntu，看看是否能适应，要是OK就转战Ubuntu了。暂时装上的是雨林木风出的版本，内置了不少常用软件，比如Awn管理器，ibus输入法框架（居然有86版的五笔，正好用上），QQ Linux版本（但不知为什么，总是会挂掉，刚开始以为是不小心按了关闭的快捷键之类的，但三番五次出现挂掉的现象，实在受不了，所以还是先使用Pidgin），另外还有迅雷和电驴等等，还是比较方便的，先用来学习一下。

系统可以正常工作了，第一件事是要学会访问Twitter。Google了一下，还是在车大的博客上发现在了使用方法。
ssh -qTfnN -D 7070 remotehost.
All the added options are for a ssh session that’s used for tunneling.
-q :- be very quite, we are acting only as a tunnel.
-T :- Do not allocate a pseudo tty, we are only acting a tunnel.
-f :- move the ssh process to background, as we don’t want to [...]]]></description>
			<content:encoded><![CDATA[<p>Win7到期，也无法使用slmgr.vbs /rearm命令，系统提示只能再次重装才行。想了想干脆试用一段Ubuntu，看看是否能适应，要是OK就转战Ubuntu了。暂时装上的是雨林木风出的版本，内置了不少常用软件，比如<a href="http://code.google.com/p/avant-window-navigator" target="_blank">Awn管理器</a>，<a href="http://code.google.com/p/ibus/" target="_blank">ibus输入法框架</a>（居然有86版的五笔，正好用上），QQ <a href="http://14551.org/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">Linux</a>版本（但不知为什么，总是会挂掉，刚开始以为是不小心按了关闭的快捷键之类的，但三番五次出现挂掉的现象，实在受不了，所以还是先使用Pidgin），另外还有迅雷和电驴等等，还是比较方便的，先用来学习一下。<br />
<span id="more-2164"></span><br />
系统可以正常工作了，第一件事是要学会访问Twitter。Google了一下，还是在<a href="http://www.chedong.com/blog/archives/001246.html#comment-56108">车大的博客</a>上发现在了使用方法。</p>
<p style="padding-left: 30px;">ssh -qTfnN -D 7070 remotehost.</p>
<p style="padding-left: 30px;">All the added options are for a ssh session that’s used for tunneling.</p>
<p style="padding-left: 30px;">-q :- be very quite, we are acting only as a tunnel.<br />
-T :- Do not allocate a pseudo tty, we are only acting a tunnel.<br />
-f :- move the ssh process to background, as we don’t want to interact with this ssh session directly.<br />
-N :- Do not execute remote command.<br />
-n :- redirect standard input to /dev/null.</p>
<p style="padding-left: 30px;">In addition on a slow line you can gain performance by enabling compression with the -C option.</p>
<p>仍然是SSH＋Firefox＋Autoproxy的形式，终端代替了Myentunnel软件，但连上了，我却不知如何结束连接，而且最好有类似批处理的快捷方式供使用。</p>
<p>继续折腾，不过我想需要更多的时间去学习能用于赚钱的能力了。<br />
未来真可怕。</p>

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://14551.org/2010/02/create-tunnel-user.html" title="ZT:最小化权限的ssh账号-只能使用TCP转发 (2010-02-22)">ZT:最小化权限的ssh账号-只能使用TCP转发</a></li>
	<li><a href="http://14551.org/2009/09/wget-command-usage.html" title="wget 命令用法详解 (2009-09-26)">wget 命令用法详解</a></li>
	<li><a href="http://14551.org/2010/07/ubuntu-ssh-proxy-plink.html" title="Ubuntu下，使用SSH帐号代理访问（2） (2010-07-28)">Ubuntu下，使用SSH帐号代理访问（2）</a></li>
	<li><a href="http://14551.org/2009/05/ssh.html" title="SSH已开通。 (2009-05-01)">SSH已开通。</a></li>
	<li><a href="http://14551.org/2010/06/proxychains.html" title="proxychains 强制 Linux 下软件翻墙 (2010-06-18)">proxychains 强制 Linux 下软件翻墙</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://14551.org/2009/12/ubuntu-ssh-proxy.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>wget 命令用法详解</title>
		<link>http://14551.org/2009/09/wget-command-usage.html</link>
		<comments>http://14551.org/2009/09/wget-command-usage.html#comments</comments>
		<pubDate>Sat, 26 Sep 2009 07:33:30 +0000</pubDate>
		<dc:creator>摇光</dc:creator>
				<category><![CDATA[收藏分享]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://14551.org/2009/09/wget-command-usage.html</guid>
		<description><![CDATA[wget是在Linux下开发的开放源代码的软件，作者是Hrvoje Niksic，后来被移植到包括Windows在内的各个平台上。它有以下功能和特点：   （1）支持断点下传功能；这一点，也是网络蚂蚁和FlashGet当年最大的卖点，现在，Wget也可以使用此功能，那些网络不是太好的用户可以放心了；    （2）同时支持FTP和HTTP下载方式；尽管现在大部分软件可以使用HTTP方式下载，但是，有些时候，仍然需要使用FTP方式下载软件；    （3）支持代理服务器；对安全强度很高的系统而言，一般不会将自己的系统直接暴露在互联网上，所以，支持代理是下载软件必须有的功能；    （4）设置方便简单；可能，习惯图形界面的用户已经不是太习惯命令行了，但是，命令行在设置上其实有更多的优点，最少，鼠标可以少点很多次，也不要担心是否错点鼠标；    （5）程序小，完全免费；程序小可以考虑不计，因为现在的硬盘实在太大了；完全免费就不得不考虑了，即使网络上有很多所谓的免费软件，但是，这些软件的广告却不是我们喜欢的； 
 
wget虽然功能强大，但是使用起来还是比较简单的，基本的语法是：wget [参数列表] URL。下面就结合具体的例子来说明一下wget的用法。   1、下载整个http或者ftp站点。    wget http://place.your.url/here    这个命令可以将http://place.your.url/here 首页下载下来。使用-x会强制建立服务器上一模一样的目录，如果使用-nd参数，那么服务器上下载的所有内容都会加到本地当前目录。 
wget -r http://place.your.url/here    这个命令会按照递归的方法，下载服务器上所有的目录和文件，实质就是下载整个网站。这个命令一定要小心使用，因为在下载的时候，被下载网站指向的所有地址同样会被下载，因此，如果这个网站引用了其他网站，那么被引用的网站也会被下载下来！基于这个原因，这个参数不常用。可以用-l number参数来指定下载的层次。例如只下载两层，那么使用-l 2。 
要是您想制作镜像站点，那么可以使用－m参数，例如：wget -m http://place.your.url/here    这时wget会自动判断合适的参数来制作镜像站点。此时，wget会登录到服务器上，读入robots.txt并按robots.txt的规定来执行。 
2、断点续传。 [...]]]></description>
			<content:encoded><![CDATA[<p>wget是在<a href="http://14551.org/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">Linux</a>下开发的开放源代码的软件，作者是Hrvoje Niksic，后来被移植到包括Windows在内的各个平台上。它有以下功能和特点：   <br />（1）支持断点下传功能；这一点，也是网络蚂蚁和FlashGet当年最大的卖点，现在，Wget也可以使用此功能，那些网络不是太好的用户可以放心了；    <br />（2）同时支持FTP和HTTP下载方式；尽管现在大部分软件可以使用HTTP方式下载，但是，有些时候，仍然需要使用FTP方式下载软件；    <br />（3）支持代理服务器；对安全强度很高的系统而言，一般不会将自己的系统直接暴露在互联网上，所以，支持代理是下载软件必须有的功能；    <br />（4）设置方便简单；可能，习惯图形界面的用户已经不是太习惯命令行了，但是，命令行在设置上其实有更多的优点，最少，鼠标可以少点很多次，也不要担心是否错点鼠标；    <br />（5）程序小，完全免费；程序小可以考虑不计，因为现在的硬盘实在太大了；完全免费就不得不考虑了，即使网络上有很多所谓的免费软件，但是，这些软件的广告却不是我们喜欢的； </p>
<p> <span id="more-1883"></span>
<p>wget虽然功能强大，但是使用起来还是比较简单的，基本的语法是：wget [参数列表] URL。下面就结合具体的例子来说明一下wget的用法。   <br />1、下载整个http或者ftp站点。    <br />wget <a href="http://place.your.url/here">http://place.your.url/here</a>    <br />这个命令可以将http://place.your.url/here 首页下载下来。使用-x会强制建立服务器上一模一样的目录，如果使用-nd参数，那么服务器上下载的所有内容都会加到本地当前目录。 </p>
<p>wget -r <a href="http://place.your.url/here">http://place.your.url/here</a>    <br />这个命令会按照递归的方法，下载服务器上所有的目录和文件，实质就是下载整个网站。这个命令一定要小心使用，因为在下载的时候，被下载网站指向的所有地址同样会被下载，因此，如果这个网站引用了其他网站，那么被引用的网站也会被下载下来！基于这个原因，这个参数不常用。可以用-l number参数来指定下载的层次。例如只下载两层，那么使用-l 2。 </p>
<p>要是您想制作镜像站点，那么可以使用－m参数，例如：wget -m <a href="http://place.your.url/here">http://place.your.url/here</a>    <br />这时wget会自动判断合适的参数来制作镜像站点。此时，wget会登录到服务器上，读入robots.txt并按robots.txt的规定来执行。 </p>
<p>2、断点续传。   <br />当文件特别大或者网络特别慢的时候，往往一个文件还没有下载完，连接就已经被切断，此时就需要断点续传。wget的断点续传是自动的，只需要使用-c参数，例如：    <br />wget -c <a href="http://the.url.of/incomplete/file">http://the.url.of/incomplete/file</a>    <br />使用断点续传要求服务器支持断点续传。-t参数表示重试次数，例如需要重试100次，那么就写-t 100，如果设成-t 0，那么表示无穷次重试，直到连接成功。-T参数表示超时等待时间，例如-T 120，表示等待120秒连接不上就算超时。 </p>
<p>3、批量下载。   <br />如果有多个文件需要下载，那么可以生成一个文件，把每个文件的URL写一行，例如生成文件download.txt，然后用命令：wget -i download.txt    <br />这样就会把download.txt里面列出的每个URL都下载下来。（如果列的是文件就下载文件，如果列的是网站，那么下载首页） </p>
<p>4、选择性的下载。   <br />可以指定让wget只下载一类文件，或者不下载什么文件。例如：    <br />wget -m –reject=gif <a href="http://target.web.site/subdirectory">http://target.web.site/subdirectory</a>    <br />表示下载http://target.web.site/subdirectory，但是忽略gif文件。–accept=LIST 可以接受的文件类型，–reject=LIST拒绝接受的文件类型。 </p>
<p>5、密码和认证。   <br />wget只能处理利用用户名/密码方式限制访问的网站，可以利用两个参数：    <br />–http-user=USER设置HTTP用户    <br />–http-passwd=PASS设置HTTP密码    <br />对于需要证书做认证的网站，就只能利用其他下载工具了，例如curl。 </p>
<p>6、利用代理服务器进行下载。   <br />如果用户的网络需要经过代理服务器，那么可以让wget通过代理服务器进行文件的下载。此时需要在当前用户的目录下创建一个.wgetrc文件。文件中可以设置代理服务器：    <br />http-proxy = 111.111.111.111:8080    <br />ftp-proxy = 111.111.111.111:8080    <br />分别表示http的代理服务器和ftp的代理服务器。如果代理服务器需要密码则使用：    <br />–proxy-user=USER设置代理用户    <br />–proxy-passwd=PASS设置代理密码    <br />这两个参数。    <br />使用参数–proxy=on/off 使用或者关闭代理。    <br />wget还有很多有用的功能，需要用户去挖掘。 </p>
<p>附录： </p>
<p>命令格式：   <br />wget [参数列表] [目标软件、网页的网址] </p>
<p>-V,–version 显示软件版本号然后退出；   <br />-h,–help显示软件帮助信息；    <br />-e,–execute=COMMAND 执行一个 “.wgetrc”命令 </p>
<p>-o,–output-file=FILE 将软件输出信息保存到文件；   <br />-a,–append-output=FILE将软件输出信息追加到文件；    <br />-d,–debug显示输出信息；    <br />-q,–quiet 不显示输出信息；    <br />-i,–input-file=FILE 从文件中取得URL； </p>
<p>-t,–tries=NUMBER 是否下载次数（0表示无穷次）   <br />-O –output-document=FILE下载文件保存为别的文件名    <br />-nc, –no-clobber 不要覆盖已经存在的文件    <br />-N,–timestamping只下载比本地新的文件    <br />-T,–timeout=SECONDS 设置超时时间    <br />-Y,–proxy=on/off 关闭代理 </p>
<p>-nd,–no-directories 不建立目录   <br />-x,–force-directories 强制建立目录 </p>
<p>–http-user=USER设置HTTP用户   <br />–http-passwd=PASS设置HTTP密码    <br />–proxy-user=USER设置代理用户    <br />–proxy-passwd=PASS设置代理密码 </p>
<p>-r,–recursive 下载整个网站、目录（小心使用）   <br />-l,–level=NUMBER 下载层次 </p>
<p>-A,–accept=LIST 可以接受的文件类型   <br />-R,–reject=LIST拒绝接受的文件类型    <br />-D,–domains=LIST可以接受的域名    <br />–exclude-domains=LIST拒绝的域名    <br />-L,–relative 下载关联链接    <br />–follow-ftp 只下载FTP链接    <br />-H,–span-hosts 可以下载外面的主机    <br />-I,–include-directories=LIST允许的目录    <br />-X,–exclude-directories=LIST 拒绝的目录 </p>
<p>中文文档名在平常的情况下会被编码， 但是在 –cut-dirs 时又是正常的，   <br />wget -r -np -nH –cut-dirs=3 <a href="ftp://host/test/">ftp://host/test/</a>    <br />测试.txt    <br />wget -r -np -nH -nd <a href="ftp://host/test/">ftp://host/test/</a>    <br />%B4%FA%B8%D5.txt    <br />wget “<a href="ftp://host/test/*&rdquo;">ftp://host/test/*”</a>    <br />%B4%FA%B8%D5.txt </p>
<p>由 於不知名的原因，可能是为了避开特殊档名， wget 会自动将抓取档名的部分用 encode_string 处理过， 所以该 patch 就把被 encode_string 处理成 “%3A” 这种东西， 用 decode_string 还原成 “:”，并套用在目录与档案名称的部分，decode_string 是 wget 内建的函式。 </p>
<p>wget -t0 -c -nH -x -np -b -m -P /home/sunny/NOD32view/&#160; <a href="http://downloads1.kaspersky-labs.com/bases/">http://downloads1.kaspersky-labs.com/bases/</a> -o wget.log </p>
<p>原文地址：http://<a href="http://14551.org/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">linux</a>.blogbus.com/logs/46636997.html</p>

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://14551.org/2009/09/exchange-server-quickly.html" title="快速网站转移 (2009-09-24)">快速网站转移</a></li>
	<li><a href="http://14551.org/2009/09/apt-get-install-build-essential.html" title="为Ubuntu安装编译环境 (2009-09-25)">为Ubuntu安装编译环境</a></li>
	<li><a href="http://14551.org/2009/06/wget.html" title="ZT：WGet使用指南 (2009-06-16)">ZT：WGet使用指南</a></li>
	<li><a href="http://14551.org/2010/05/linux-du.html" title="ZT：Linux详细查看文件夹大小 (2010-05-21)">ZT：Linux详细查看文件夹大小</a></li>
	<li><a href="http://14551.org/2010/02/create-tunnel-user.html" title="ZT:最小化权限的ssh账号-只能使用TCP转发 (2010-02-22)">ZT:最小化权限的ssh账号-只能使用TCP转发</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://14551.org/2009/09/wget-command-usage.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Putty 乱码问题</title>
		<link>http://14551.org/2009/09/putty-ssh-unicode.html</link>
		<comments>http://14551.org/2009/09/putty-ssh-unicode.html#comments</comments>
		<pubDate>Fri, 25 Sep 2009 13:15:00 +0000</pubDate>
		<dc:creator>摇光</dc:creator>
				<category><![CDATA[收藏分享]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://14551.org/2009/09/putty-ssh-unicode.html</guid>
		<description><![CDATA[选择window-〉Appearance-〉Font settings-〉Change…,选择Fixedsys字体,字符集选择CHINESE_GB2312。   在window-〉Appearance-〉 Translation中，Received data assumed to be in which character set 中,把Use font encoding改为UTF-8。如果经常使用,把这些设置保存在session里面.     打开putty,登录成功后,在shell中输入:export LC_ALL=’zh_CN.utf8′。
成功。

	相关日志
	
	快速网站转移
	wget 命令用法详解
	Godaddy的Linux主机开通SSH
	在CentOS上安装Openvpn
	分享 SSH 帐号 0324


]]></description>
			<content:encoded><![CDATA[<p>选择window-〉Appearance-〉Font settings-〉Change…,选择Fixedsys字体,字符集选择CHINESE_GB2312。   <br />在window-〉Appearance-〉 Translation中，Received data assumed to be in which character set 中,把Use font encoding改为UTF-8。如果经常使用,把这些设置保存在session里面.     <br />打开putty,登录成功后,在shell中输入:export LC_ALL=’zh_CN.utf8′。</p>
<p>成功。</p>

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://14551.org/2009/09/exchange-server-quickly.html" title="快速网站转移 (2009-09-24)">快速网站转移</a></li>
	<li><a href="http://14551.org/2009/09/wget-command-usage.html" title="wget 命令用法详解 (2009-09-26)">wget 命令用法详解</a></li>
	<li><a href="http://14551.org/2009/04/godaddy-ssh.html" title="Godaddy的Linux主机开通SSH (2009-04-30)">Godaddy的Linux主机开通SSH</a></li>
	<li><a href="http://14551.org/2010/09/install-openvpn-on-centos.html" title="在CentOS上安装Openvpn (2010-09-01)">在CentOS上安装Openvpn</a></li>
	<li><a href="http://14551.org/2010/03/ssh-0324.html" title="分享 SSH 帐号 0324 (2010-03-24)">分享 SSH 帐号 0324</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://14551.org/2009/09/putty-ssh-unicode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
