http://www.linuxidc.com/Linux/2014-12/110466.htm (openssh平滑升级步骤)
1、下载dropbear:https://matt.ucc.asn.au/dropbear/
2、检查安装依赖包
[root@localhost ~]# yum install zlib* gcc make
3、编译安装dropbear
[root@localhost home]# tar -jxvf dropbear-2017.75.tar.bz2
[root@localhost home]# cd dropbear-2017.75/
[root@localhost dropbear-2017.75]# ./configure
[root@localhost dropbear-2017.75]# make && make install
检查生成的文件是否正确:
[root@localhost dropbear-2017.75]# ls /usr/local/sbin/ /usr/local/bin/
/usr/local/bin/:
dbclient dropbearconvert dropbearkey
/usr/local/sbin/:
dropbear
检查生成的文件是否正确:
[root@localhost dropbear-2017.75]# mkdir /etc/dropbear/
4、生成证书
[root@localhost dropbear-2017.75]# /usr/local/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
[root@localhost dropbear-2017.75]# /usr/local/bin/dropbearkey -t rsa -s 4096 -f /etc/dropbear/dropbear_rsa_host_key
5、启动dropbear
[root@localhost dropbear-2017.75]# /usr/local/sbin/dropbear -p 2222 //监听2222端口
查看是否启动成功:
[root@localhost dropbear-2017.75]# netstat -antup
或则通过命令:
[root@localhost home]# netstat -anput | grep dropbear
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN 7524/dropbear
tcp 0 52 172.17.123.137:2222 10.9.50.137:56685 ESTABLISHED 7526/dropbear
tcp 0 0 :::2222 :::* LISTEN 7524/dropbear
则可以直接通过putty或者xshell用ssh方式 端口 2222登录了。
另
如果要删除dropbear安装的文件,并杀掉进程
# rm -rf /etc/dropbear/ /usr/local/sbin/dropbear /usr/local/bin/dropbear*
[root@localhost ~]# ps aux | grep dropbear
root 2151 0.0 0.0 103324 888 pts/1 S+ 11:45 0:00 grep dropbear
root 7524 0.0 0.0 14832 616 ? Ss 10:46 0:00 /usr/local/sbin/dropbear -p 2222
[root@localhost ~]# kill -9 14832
[root@localhost home]# netstat -anput | grep dropbear # 验证是否OK!