How To Replacing OpenSSH With Dropbear on CentOS

Dropbear is a relatively small SSH server and client. It runs on a variety of POSIX-based platforms. Dropbear is open source software, distributed under a MIT-style license. Dropbear is particularly useful for “embedded”-type Linux (or other Unix) systems, such as wireless routers.

Features

  • A small memory footprint suitable for memory-constrained environments – Dropbear can compile to a 110kB statically linked binary with uClibc on x86 (only minimal options selected)
  • Dropbear server implements X11 forwarding, and authentication-agent forwarding for OpenSSH clients
  • Can run from inetd or standalone
  • Compatible with OpenSSH ~/.ssh/authorized_keys public key authentication
  • The server, client, keygen, and key converter can be compiled into a single binary (like busybox)
  • Features can easily be disabled when compiling to save space
  • Multi-hop mode uses SSH TCP forwarding to tunnel through multiple SSH hosts in a single command. dbclient user1@hop1,user2@hop2,destination

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. In this tutorial we will learn through the step by step replacing Dropbear SSH in CentOS server.

Replacing OpenSSH With Dropbear on CentOS

To install, first you must add the yum repository information corresponding to your CentOS/RHEL version to yum:

For CentOS 6.x use:

#wget http://dl.fedoraproject.org/pub/epel/6/i386/dropbear-0.58-1.el6.i686.rpm
#rpm -Uvh dropbear-0.58-1.el6.i686.rpm

For CentOS 5.x use:

#wget http://dl.fedoraproject.org/pub/epel/5/i386/dropbear-0.55-1.el5.i386.rpm
#rpm -Uvh dropbear-0.55-1.el5.i386.rpm

First we will just install dropbear using yum:

 #yum install dropbear

Now we just need to start up new SSH server:

 #nano /etc/init.d/dropbear

Edit port dropbear:

 #OPTIONS=" -p 222"

Add dropbear to startup and start the sever:

#chkconfig dropbear on
#service dropbear start

Next you can stop the current OpenSSH server:

 #yum remove openssh-server

Note: Make sure you check that it is indeed running and verify from another box before you logout your current session otherwise.

Congratulation’s! You have successfully installed Dropbear. Thanks for using this tutorial for installing Dropbear SSH in CentOS system.

Leave a Reply