生成密钥
ssh-keygen -t rsa
一路回车即可,然后执行:ls ~/.ssh
会看到两个密钥文件id_rsa(私钥), id_rsa.pub(公钥)配置~/.ssh/config 在~/.ssh/config(没有就新建)里添加:
Host {NAME} # 主机名, 别名
HostName {IP} # 完整的主机名, IP
User root # 登录用户
IdentityFile ~/.ssh/id_rsa # 私钥
将公钥拷贝到远程主机 ssh登录到远程主机,将公钥内容拷贝到~/.ssh/authorized_keys文件后面,如果没有就新建。 然后就可以免密登录到远程主机了。
关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
安装依赖
yum -y install epel-release
yum -y update
yum -y install wget gcc automake autoconf libtool make m2crypto autoconf libtool curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel pcre-devel asciidoc xmlto git
安装 Libsodium
export LIBSODIUM_VER=1.0.13
wget https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VER.tar.gz
tar xvf libsodium-$LIBSODIUM_VER.tar.gz
pushd libsodium-$LIBSODIUM_VER
./configure --prefix=/usr && make
sudo make install
popd
sudo ldconfig
安装 MbedTLS
export MBEDTLS_VER=2.6.0
wget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz
tar xvf mbedtls-$MBEDTLS_VER-gpl.tgz
pushd mbedtls-$MBEDTLS_VER
make SHARED=1 CFLAGS=-fPIC
sudo make DESTDIR=/usr install
popd
sudo ldconfig
下载 Shadowsocks-libev 源码
cd ~
git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
git submodule update --init --recursive
编译 Shadowsocks-libev
cd ~/shadowsocks-libev
./autogen.sh && ./configure --prefix=/usr/local/shadowsocks-libev && make && make install
安装 Simple-obfs
git clone https://github.com/shadowsocks/simple-obfs.git
cd simple-obfs
git submodule update --init --recursive
./autogen.sh
./configure && make
make install
Shadowsocks-libev Systemd 配置文件
vim /etc/systemd/system/shadowsocks-libev.service
# This file is part of shadowsocks-libev.
#
# Shadowsocks-libev is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This file is default for RPM packaging. See also
# /etc/sysconfig/shadowsocks-libev for environment variables.
[Unit]
Description=Shadowsocks-libev Default Server Service
Documentation=man:shadowsocks-libev(8)
After=network.target
[Service]
Type=simple
#EnvironmentFile=/etc/sysconfig/shadowsocks-libev
User=nobody
Group=nobody
LimitNOFILE=32768
ExecStart=/usr/local/shadowsocks-libev/bin/ss-server -c /etc/shadowsocks-libev/config.json $DAEMON_ARGS
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
创建配置文件
vi /etc/shadowsocks-libev/config.json
{
"server":"0.0.0.0",
"server_port":8388,
"local_port":1080,
"password":"Password",
"timeout":60,
"method":"chacha20",
"plugin": "obfs-server",
"plugin_opts": "obfs=http"
}
Systemd 启动 Shadowsocks-libev
systemctl enable shadowsocks-libev.service
systemctl start shadowsocks-libev.service
systemctl status shadowsocks-libev.service
上海市宝山区人民法院审理了一起案件,被告人戴某原在某证券管理公司从事软件开发工作。自 2016 年 4 月起,其为牟取非法利益,创建某网站,并在网站上出售 VPN 翻墙软件的账户
vpn在很多人心目中就是用来科学上网的工具,其实不是。vpn最主要的功能,并不是用来科学上网,只是它可以达到科学上网的目的。vpn--虚拟专用网络,它的功能是:在公用网络上建立专用网络
内容以共享、参考、研究为目的,不存在任何商业目的。其版权属原作者所有,如有侵权或违规,请与小编联系!情况属实本人将予以删除!