ADSL Modem网线连接到路由器的有线接口。路由器的开关拨到刻有 Router/AP 字样的档位,如果你没有给路由器动过手术,就是从上往下数的第一档。本文以router模式为例,如果你的应用场景是ap模式,请自行相应变通。
电脑连接到无线 网络 eastking-dir505
输入密码 fanqiang
登陆ssh
有时会提示错误:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
cf:c5:12:34:56:0b:4d:1c:56:48:6a:87:04:cf:b8:83.
Please contact your system administrator.
Add correct host key in /home/openwrt-fanqiang/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/openwrt-fanqiang/.ssh/known_hosts:3
remove with: ssh-keygen -f "/home/openwrt-fanqiang/.ssh/known_hosts" -R 192.168.1.1
RSA host key for 192.168.1.1 has changed and you have requested strict checking.
Host key verification failed.
解决办法就是复制并运行提示中的清理命令:
ssh-keygen -f "/home/openwrt-fanqiang/.ssh/known_hosts" -R 192.168.1.1
然后就可以正常登陆了。
root@OpenWrt:~# vi /etc/shadowsocks.json
root@OpenWrt:~# vi /usr/bin/router
root@OpenWrt:~# vi /usr/bin/ap #如果是ap模式
root@OpenWrt:~# vi /usr/bin/shadowsocks-firewall
分别修改以下值:
- shadowsocks.json中,server改成你的服务器实际IP
- router/ap中 adslname 和 adslpassword改成实际值
- shadowsocks-firewall中,107.89.0.12必须改成你的服务器实际IP
如果你还改了其他默认值,请自行修改相应文件。不建议修改其他默认值,以提高一次成功率。
root@OpenWrt:~# /etc/init.d/shadowsocks stop
root@OpenWrt:~# /etc/init.d/shadowsocks start
root@OpenWrt:~# /etc/init.d/dnsmasq restart
root@OpenWrt:~# /etc/init.d/network restart
等待约两分钟,就可以测试是否可以在网上畅行无阻了。