This document explains how to set up your Elemental Linux Server (ELS) system for encrypted remote access and file transfers using the Dropbear secure shell (SSH) implementation.
You need to have your ELS system set up to build from source code. You should also have another machine on your network with an SSH client and rsync for testing purposes.
Dropbear does not come as a binary package and must be installed from source. The following instructions explain how to build Dropbear and install it into the /usr/local hierarchy:
The following example shows how you would install Dropbear-0.53.1 onto an ELS system with a separate /usr/local partition already set up.
cd /usr/local/src wget http://matt.ucc.asn.au/dropbear/dropbear-0.53.1.tar.gz tar -zxf dropbear-0.53.1.tar.gz cd dropbear-0.53.1 ./configure vi options.h #define DSS_PRIV_FILENAME "/usr/local/etc/dropbear_dss_host_key" #define RSA_PRIV_FILENAME "/usr/local/etc/dropbear_rsa_host_key" make make install cp dbclient.1 /usr/local/man/man1/ cp dropbear.8 /usr/local/man/man8/ cp dropbearkey.8 /usr/local/man/man8/
Before using Dropbear for remote access, you must carry out the following set-up tasks:
The following example shows the commands you would enter to configure your ELS host to accept incoming SSH connections from any host on the network.
dropbearkey -t dss -f /usr/local/etc/dropbear_dss_host_key dropbearkey -t rsa -f /usr/local/etc/dropbear_rsa_host_key vi /etc/inetd.conf ssh stream tcp nowait root /usr/local/sbin/dropbear dropbear -i killall -HUP inetd vi /etc/firewall -A INPUT -p tcp --dport 22 -j ACCEPT /etc/init.d/network restart
Once everything is configured, you'll want to test remote logins and file transfers.
The following example shows a non-privileged user named 'joe' accessing his ELS box from a remote host and creating a file. After the file is created, he logs out and then proceeds to retrieve the file using rsync over SSH.
joe@test-box:~> ssh joe@els-host The authenticity of host 'els-host (10.10.10.22)' can't be established. RSA key fingerprint is 12:34:56:78:90:12:34:56:78:90:12:34:56:78:90:12. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'els-host' (RSA) to the list of known hosts. joe@els-host's password: els-host:~$ cat "This is a test." >testing.txt els-host:~$ exit joe@test-box:~> rsync -avz -e ssh joe@els-host:testing.txt . joe@els-host's password: receiving incremental file list testing.txt sent 30 bytes received 110 bytes 40.00 bytes/sec total size is 16 speedup is 0.11
If you cannot access your ELS machine via SSH here are a few things to check.
For help with Dropbear, the author of the software offers additional information and mailing list on his web site.