1,安装obfuscated-openssh server
obfuscated-openssh可以代替系统的OpenSSH服务,如果在安装过程中不指定–prefix选项,它将替换系统openssh-server的二进制程序和配置文件. 本文在指定了安装目录,并不会与系统自带的openssh服务冲突.
yum install zlib openssl #适用Redhat/CentOS系统 sudo apt-get install zlib1g-dev libssl-dev #适用Ubuntu系统 wget -O ofcssh.tar.gz https://github.com/brl/obfuscated-openssh/tarball/master tar zxvf ofcssh.tar.gz cd brl-obfuscated-openssh-ca93a2c/ ./configure --prefix=/usr/local/obfus make make install sed -i "s/Port /#Port /g" /usr/local/obfus/etc/sshd_config #22端口被正常的SSH服务使用,这里不需要 sed -i "s/UsePAM /#UsePAM /g" /usr/local/obfus/etc/sshd_config #obfuscated-openssh不支持UsePAM选项 echo "ObfuscatedPort 32" >> /usr/local/obfus/etc/sshd_config #指定监听端口 echo "ObfuscateKeyword fuckthegfw" >> /usr/local/obfus/etc/sshd_config #指定混淆密钥 运行: /usr/local/obfus/sbin/sshd -f /usr/local/obfus/etc/sshd_config & 记得写入/etc/rc.local
参考资料:
http://blog.slpo.net/?p=1234
2,obfuscated-openssh客户端选择
Bitvise SSH Client (Tunnelier) (已经支持obfuscation,可以建立本地的socks5代理)
potty