ssh協議的另一個實現:dropbear
編譯安裝dropbear
[root@centos6 ~]# tar xf dropbear-2013.58.tar.bz2 [root@centos6 ~]# cd dropbear-2013.58 [root@centos6 dropbear-2013.58]# cat INSTALL [root@centos6 dropbear-2013.58]# ./configure --prefix=/usr/local/shiyan/ --sysconfdir=/etc/dropbear.conf //報錯如下
猜想我們可以沒有安裝zlib包 [root@centos6 dropbear-2013.58]# rpm -q zlib zlib-1.2.3-29.el6.x86_64 //包存在 我們可以猜想,由于是源碼安裝所以可以缺少的是開發包zlib-devel [root@centos6 dropbear-2013.58]# yum list all | grep "zlib-devel" zlib-devel.x86_64 1.2.3-29.el6 base //存在該包且我們沒有安裝 安裝zlib-devel [root@centos6 dropbear-2013.58]# yum -y install zlib-devel.x86_64 [root@centos6 dropbear-2013.58]# ./configure --prefix=/usr/local/shiyan/ --sysconfdir=/etc/dropbear.conf [root@centos6 dropbear-2013.58]# make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" [root@centos6 dropbear-2013.58]# make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" install // 根據源碼包中INSTALL中定義的 [root@centos6 dropbear-2013.58]# ls /usr/local/shiyan/ bin sbin [root@centos6 dropbear-2013.58]# vim /etc/profile.d/dropbear.sh [root@centos6 dropbear-2013.58]# . /etc/profile.d/dropbear.sh [root@centos6 dropbear-2013.58]# cat README
由此可見運行服務需要生成服務器鑰匙
[root@centos6 dropbear-2013.58]# dropbearkey -t dss -f /tmp/dropbear_dss_host_key [root@centos6 dropbear-2013.58]# dropbearkey -t rsa -f /tmp/dropbear_rsa_host_key [root@centos6 dropbear-2013.58]# cd /usr/local/shiyan/ [root@centos6 shiyan]# ls bin sbin
測試啟動
[root@centos6 ~]# dropbear -h [root@centos6 ~]# dropbear -d /tmp/dropbear_dss_host_key -r /tmp/dropbear_rsa_host_key -p :12345
測試連接:
[root@centos6 ~]# dbclient -p 12345 root@127.0.0.1
原創文章,作者:sixijie,如若轉載,請注明出處:http://www.www58058.com/49648