Dropbear 安装配置与启动ssh服务详解

 扎啤 关注

2017.09.12 22:57* 字数 441 阅读 4160评论 0喜欢 0

一、介绍

dropbear作为一款基于ssh协议的轻量级sshd服务器,相比OpenSSH,其更简洁,更小巧,运行起来内存占用比也更小。在应用进程上,OpenSSH会开启两个sshd进程服务,而dropbear只开启一个进程,相较于OpenSSH,其对于硬件要求也更低,也更节约系统资源。
dropbear实现完整的SSH客户端和服务器版本2协议,不支持SSH版本1协议的向后兼容性,以节省空间和资源,并避免在SSH版本1的固有的安全漏洞。

dropbear主要有以下程序:

  • 服务程序:dropbear(类似于Openssh的sshd)
  • 客户程序:dbclinet(累世于Openssh的ssh)
  • 密钥生成程序:dropbearkey

二、dropbear的编译安装:

安装准备:

1. 安装开发包组
[root@CentOS7 ~]#yum groupinstall Development tools -y
2. 下载dropbear-2017.75.tar.bz2

下载源码编译.png

3. 将其dropbear进行解压缩,并查看安装自述文件

[root@CentOS7 /app]#tar xf dropbear-2017.75.tar.bz2

[root@CentOS7 /app/dropbear-2017.75]#less INSTALL README
Basic Dropbear build instructions:- Edit options.h to set which features you want.
- Edit debug.h if you want any debug options (not usually required).(If using a non-tarball copy, "autoconf; autoheader")./configure      (optionally with --disable-zlib or --disable-syslog,or --help for other options)Now compile:make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"And install (/usr/local/bin is usual default):make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" install(you can leave items out of the PROGRAMS list to avoid compiling them. If you
recompile after changing the PROGRAMS list, you *MUST* "make clean" before
recompiling - bad things will happen otherwise)See MULTI for instructions on making all-in-one binaries.If you want to compile statically, add "STATIC=1" to the make command-line.Binaries can be stripped with "make strip"============================================================================If you're compiling for a 386-class CPU, you will probably need to add
CFLAGS=-DLTC_NO_BSWAP so that libtomcrypt doesn't use 486+ instructions.============================================================================
INSTALL (file 1 of 2)...skipping...
Basic Dropbear build instructions:- Edit options.h to set which features you want.
- Edit debug.h if you want any debug options (not usually required).(If using a non-tarball copy, "autoconf; autoheader")./configure      (optionally with --disable-zlib or --disable-syslog,or --help for other options)Now compile:make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"And install (/usr/local/bin is usual default):make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" install

4、对即将安装的软件进行配置,检查当前的环境是否满足要安装软件的依赖关系,对缺少依赖关系进行yum安装

[root@CentOS7 /app/dropbear-2017.75]#./configure
configure: error: *** zlib missing - install first or check config.log *** #显示其缺少zlib-devel
[root@CentOS7 /app/dropbear-2017.75]#yum install zlib-devel -y

5. 编译安装

make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"
make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" install

6. 创建目录/etc/dropbear/,生成key文件

[root@CentOS7 /usr/local/bin]#mkdir /etc/dropbear/
[root@CentOS7 /usr/local/bin]#dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key

7. 启动dropbear,默认后台运行

[root@CentOS7 /usr/local/bin]#dropbear -E -p 2222 #-p指定端口
[17279] Sep 12 22:40:34 Failed loading /etc/dropbear/dropbear_dss_host_key
[17279] Sep 12 22:40:34 Failed loading /etc/dropbear/dropbear_ecdsa_host_key
[17280] Sep 12 22:40:34 Running in background```[root@CentOS7 /usr/local/bin]#ss -ntl
State      Recv-Q Send-Q                             Local Address:Port                                            Peer Address:Port
LISTEN     0      128                                            *:2222                                                       *:*
LISTEN     0      128                                            *:22                                                         *:*
LISTEN     0      10                                     127.0.0.1:25                                                         *:*
LISTEN     0      128                                           :::2222                                                      :::*
LISTEN     0      128                                           :::22                                                        :::*
LISTEN     0      128                                           :::23                                                        :::*

客户端:

[root@CentOS6 ~]#ssh 172.18.254.65 -p 2222
The authenticity of host '[172.18.254.65]:2222 ([172.18.254.65]:2222)' can't be established.
RSA key fingerprint is aa:06:2e:6d:0c:61:b6:e1:52:67:4e:19:4d:8e:fa:80.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[172.18.254.65]:2222' (RSA) to the list of known hosts.
root@172.18.254.65's password:
[root@CentOS7 ~]#    ##连接成功

服务端连接状态:

[root@CentOS7 /usr/local/bin]#[17294] Sep 12 22:44:45 Child connection from 172.18.254.55:37836
[17294] Sep 12 22:44:47 Password auth succeeded for 'root' from 172.18.254.55:37836

-F指定前台运行:

[root@CentOS7 ~]#dropbear -FE -p 2222
[17324] Sep 12 22:48:32 Failed loading /etc/dropbear/dropbear_dss_host_key
[17324] Sep 12 22:48:32 Failed loading /etc/dropbear/dropbear_ecdsa_host_key
[17324] Sep 12 22:48:32 Failed listening on '2222': Error listening: Address already in use
[17324] Sep 12 22:48:32 Early exit: No listening ports available.

小礼物走一走,来简书关注我

Dropbear 安装配置与启动ssh服务详解相关推荐

  1. SSH服务详解(一)–Linux SSH 服务器与客户端的安装与启动

    SSH服务详解(一)–Linux SSH 服务器与客户端的安装与启动 SSH服务详解(一)–Linux SSH 服务器与客户端的安装与启动 SSH服务详解(二)–使用私钥登录 SSH 服务器(免密登录 ...

  2. SSH服务详解(七)– SSH 连接 Github

    SSH 连接 Github SSH服务详解(一)–Linux SSH 服务器与客户端的安装与启动 SSH服务详解(二)–使用私钥登录 SSH 服务器(免密登录) SSH 服务详解 (三)-- 使用 S ...

  3. SSH 服务详解 (三)-- 使用 SSH 代理

    SSH 服务详解 (三)-- 使用 SSH 代理 SSH服务详解(一)–Linux SSH 服务器与客户端的安装与启动 SSH服务详解(二)–使用私钥登录 SSH 服务器(免密登录) SSH 服务详解 ...

  4. 第1章 ssh命令和SSH服务详解

    基础服务类系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 本文对SSH连接验证机制进行了非常详细的分析,还详细介绍了ssh客户端工具的各种 ...

  5. Windows下的Jupyter Notebook 安装与自定义启动(图文详解)

    1.Jupyter Notebook 和 pip 为了更加方便地写 Python 代码,还需要安装 Jupyter notebook. 利用 pip 安装 Jupyter notebook. 为什么要 ...

  6. android安装apk时启动一个服务器,详解Android中App的启动界面Splash的编写方法

    一.Splash界面的作用用来展现产品的Logo 应用程序初始化的操作 检查应用程序的版本 检查当前应用程序是否合法注册 二.界面的xml定义写一个布局背景设置为产品的logo图片,再添加一个text ...

  7. Ubuntu下android-4.0.3_r1源码下载,阅读工具安装配置,源码编译详解

    备注: android源码动辄6.7G,新版本的则10G左右,所以要有足够大的硬盘空间. android应用开发环境搭建:http://www.cnblogs.com/pharen/archive/2 ...

  8. 如何用atom编辑python_Atom运行Python的安装配置步骤和代码范例详解

    #coding=utf-8 """@author:nickhuang1996""" importreimportsysimporturlli ...

  9. 【Linux】docker安装centos8启动SSH服务并跨局域网连接

    适用于基于Docker的人工智能开发平台,或者容器内不能使用service.systemctl的情况(不能以docker run方式启动容器) 1.前言 # 能够docker run启动容器的建议加一 ...

最新文章

  1. HTTP详解(1)-工作原理【转】
  2. 转】用Maven构建Mahout项目
  3. MYSQL密码解密函数的使用
  4. 华章7-8月份新书简介(2015年)
  5. Java Windows注销用户,中止Windows从Java注销
  6. 如何让你在开发者工具中查看源代码有语法高亮和暗黑主题的效果
  7. 高一计算机应用选择题,职业中学 高一《计算机应用基础》期末考试题
  8. flutter框架优缺点_小程序框架全面测评
  9. BIO | NIO | AIO (Java版)
  10. 网页服务器目录属性,IIS 6.0 F1:网站属性 - 目录安全性选项卡
  11. python 给字符串加颜色
  12. Failed to load selinux policy, Freezing | CentOS | Redhat | RHEL
  13. 如何使用ARCHART XGantt表示无工作日的日历
  14. python基础什么是函数的定义及用法
  15. 南大和中科大计算机哪个好,南京大学和中国科技大学哪个更好?
  16. springboot二手车交易系统毕业设计源码131456
  17. python use ftp to download/updown
  18. 基于SpringBoot的网上购物商场管理系统
  19. ubuntu 修改默认用户名_Ubuntu默认的用户名和密码是什么?
  20. hibernate之SessionFactory和Session

热门文章

  1. 阿里某新员工吐槽:来了两个月非常想离职,会不会被阿里拉黑?
  2. 面经:阿里三、四面及HR面自我剖析---Java岗(80分钟、30分钟、15分钟)
  3. 焱融全闪 X NVIDIA InfiniBand:打造 AI 时代 GPU 计算的高性能存储技术
  4. SQL Server的数据类型
  5. 我和计算机做游戏课后反思,小班游戏我和风儿做游戏教案反思
  6. 【商业分析】FinTech之支付宝 • 数字生活开放平台
  7. C语言之calloc函数
  8. 使用ntpd配置集群时间同步
  9. 第5集丨理学对佛、道的复制
  10. 微信小程序wxs语法