I have a fully encrypted server running Debian 6 and have set up dropbear and busybox to unlock the LUKS container via SSH (as described in this tutorial and in this U&L answer).
Unfortunately, whenever I try and SSH to the server (over the LAN) at reboot, I get a "Connection refused" error. I have tried telnet and nmap to the default port (22) and both say the port is closed.
The server has a ufw rule to accept all traffic from the LAN:
Anywhere ALLOW 192.168.1.0/24
I have tried changing the port that dropbear listens on in /etc/defaults/dropbear but ssh and telnet are still refused connections1.
How can I ensure that a port is open at that stage in the boot process so that I can connect to unlock the LUKS container?
Update
Disabling the firewall makes no difference: nmap shows all ports still closed. I can, however, ping the machine.
Update 2 I believe that the issue is that dropbear is not running as the intramfs is not being correctly built.
I have tried the fixes in this open bug report, including a custom hook to ensure that the correct libraries are copied across to the initrd image, but still encounter the same problem.
- The full error, when
ssh -vvvis issued:
OpenSSH_5.9p1, OpenSSL 1.0.1a 19 Apr 2012
debug1: Reading configuration data /home/jason/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.200 [192.168.1.200] port 2200.
debug1: connect to address 192.168.1.200 port 2200: Connection refused
ssh: connect to host 192.168.1.200 port 2200: Connection refused
ps) and listening on the port you expect (vianetstat)? – larsks Apr 22 '12 at 2:15break=Xboot parameters to get an earlyinitramfsshell? Whenever I debug filesystem encryption woes, I usebreak=premount. You can check what the situation is, resolve it, and continue booting. – Alexios May 8 '12 at 9:17