Linux SSLH

Posted NancyYe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux SSLH相关的知识,希望对你有一定的参考价值。

Liunx : use port [ 443] to access  https && ssh 

 

 1 #!/usr/bin/env bash
 2 
 3 set -e
 4 [ -n "$DEBUG" ] && set -x
 5 
 6 # check if user is root
 7 if [ $(id -u) != "0" ] ; then
 8     echo -e "\033[31mError: You must run this script as root.\033[0m"
 9     exit 1
10 fi
11 
12 # install epel repo
13 if [ -z "$(rpm -qa | grep ‘epel-release‘)" ] ; then
14     SYSTEM=$(uname -r)
15     case "$SYSTEM" in
16         *el6*)
17             rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm;;
18         *el7*)
19             rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm;;
20         *)
21             echo "Unknown system: $SYSTEM"; exit 1;;
22     esac
23 fi
24 
25 # install sslh
26 yum -y install sslh --enablerepo=epel
27 
28 # change hostname
29 sed -i s/{ host: "[^"]*";/{ host: "0.0.0.0";/ /etc/sslh.cfg
30 
31 # enable and start service
32 chkconfig sslh on
33 service sslh start

 

Now , you can login 

$ ssh -p 443 [email protected]

 

以上是关于Linux SSLH的主要内容,如果未能解决你的问题,请参考以下文章

Azure App Service for Linux是否支持http2?

[linux][c/c++]代码片段02

linux打开终端如何启动scala,如何在终端下运行Scala代码片段?

Android 逆向Linux 文件权限 ( Linux 权限简介 | 系统权限 | 用户权限 | 匿名用户权限 | 读 | 写 | 执行 | 更改组 | 更改用户 | 粘滞 )(代码片段

linux中怎么查看mysql数据库版本

-bash: /usr/bin/ls: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory(代码片段