安装dropbear替代ssh

dropbear下载地址:https://matt.ucc.asn.au/dropbear/releases/dropbear-2020.81.tar.bz2

软件 版本号 说明
opensuse  15.3  
ssh 8  
dropbear 2020.81  
     

 

安装编译器和依赖:

zypper install zlib-devel gcc

配置安装目录:

./configure --prefix=/opt/dropbear

编译安装

make
make install

添加配置文件及目录

cd /opt/dropbear
mkdir -p etc/sysconfig
touch etc/sysconfig/dropbear

修改配置文件内容(第一行其实没得什么用)

# the TCP port that Dropbear listens on
DROPBEAR_PORT=22222

# any additional arguments for Dropbear
DROPBEAR_EXTRA_ARGS=

# specify an optional banner file containing a message to be
# sent to clients before they connect, such as "/etc/issue.net"
DROPBEAR_BANNER=""

# RSA hostkey file (default: /etc/dropbear/dropbear_rsa_host_key)
DROPBEAR_RSAKEY="/etc/dropbear/dropbear_rsa_host_key"

# DSS hostkey file (default: /etc/dropbear/dropbear_dss_host_key)
DROPBEAR_DSSKEY="/etc/dropbear/dropbear_dss_host_key"

# port
OPTIONS=-p 3389 -R  

编写systemd服务文件dropbear.service

[Unit]
Description=Dropbear SSH Server Daemon
Documentation=man:dropbear(8)
Wants=dropbear-keygen.service
After=network.target

[Service]
EnvironmentFile=-/opt/dropbear/etc/sysconfig/dropbear
ExecStart=/opt/dropbear/sbin/dropbear -E -F $OPTIONS

[Install]
WantedBy=multi-user.target

把systemd服务文件放入目录并加载

cp dropbear.service /usr/lib/systemd/system
systemctl daemon-reload
systemctl start dropbear

 

安装dropbear替代ssh

上一篇:10. Mybatis多表查询 一对一查询


下一篇:elk存储日志你需要知道一些冷知识