dropbear通常用在低配的vps和openwrt上面,以更大程度的节省资源

安装

# apt-get install dropbear xinetd

停用ssh

# touch /etc/ssh/sshd_not_to_be_run

# invoke-rc.d ssh stop

配置dropbear

    cat > /etc/xinetd.d/dropbear <<END

service ssh

{

    socket_type     = stream

    only_from       = 0.0.0.0

    wait            = no

    user            = root

    protocol        = tcp

    server          = /usr/sbin/dropbear

    server_args     = -i -s -w -K 60

    disable         = no

    port            = 8066

    type            = unlisted

}

 

其中,server_args的参数如下

-i Start for inetd ## xinetd 服务模式

-w Disallow root logins  #禁止root登录

-s Disable password logins  #禁用密码登录

-K (0 is never, default 0, in seconds)  #设置 keepalive 连接保持时间

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注