Linux SSH config

1. Server Configuration

If you are using remote cloud server, you need some tools like Xshell in Windows, or iterm in iMac and ssh in Linux. If your Windows10 is available, you may type 'bash' in cmd and get into a virtual ubuntu without installing Xshell or other tools. You can connect to your romote server by:

ssh -l [username] [ip]

e.g. ssh -l root 120.120.120.120

Then you login the server with root account and begin to config by the following code:

apt-get update

apt-get install python-pip

pip install --upgrade pip

pip install setuptools

pip install shadowsocks

vim /etc/shadowsocks.json

shadowsocks. json should contains this:

{
    "server":"0.0.0.0",
    "server_port":1024,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"mypassword",
    "timeout":300,
    "method":"aes-256-cfb"
}

Note that the password above is the password you will use in the future, and it is not neccessary to be the same as the server password.

chmod 755 /etc/shadowsocks.json

apt-get install python-m2crypto

ssserver -c /etc/shadowsocks.json -d start

vim /etc/rc.local

Insert this before `exit 0`:

ssserver -c /etc/shadowsocks.json -d start
exit 0

 

You may meet some problem when config your pip, e.g.

 File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

Then you can edit the file (see here: 

The bug is found in pip 10.0.0. In linux you need to modify file: /usr/bin/pip from:

from pip import main
if __name__ == '__main__':
    sys.exit(main())

to:

from pip import __main__
if __name__ == '__main__':
    sys.exit(__main__._main())

 

2. Client of shadowsocks

 

You can visit its github, and click 'release', or visit its website download it and install. And type its IP and password according the the information above.

 

 

3. Enjoy it.

 

转载于:https://www.cnblogs.com/heenhui2016/p/8903679.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值