# Genkernel SSH option explained.

## viaCrucis

I've installed the initramfs with the ssh (dropbear) option, but I'm still lost as far as the implementation goes.  This is what I have figured out, so far, from going through /usr/share/genkernel/default/login-remote.sh and initrd.scripts...

* I start the box in questions.

* From the remote system, I transmit the LUKS key (ref:login-remote.sh:114-123):

```

$ dd if=fortknox.key | ssh -o UserKnownHostsFile=/tmp/tmpknownhost root@fortknox.example.org -- post root

1+0 records in

1+0 records out

512 bytes copied, 5.9631e-05 s, 8.6 MB/s

```

* Then I bump it to get it unlocked (ref: login-remote.sh:124-127):

```

$ ssh -o UserKnownHostsFile=/tmp/tmpknownhost root@fortknox.example.org 

rmdir: 'tmp': Directory not empty

Connection to fortknox.example.org closed.

```

Yet, the box still remains held up at:

 *Quote:*   

> Enter passphrase for /dev/vda3:

 

I know that it has unlocked the luks volume, as evident in busybox, but it doesn't free up the local cryptsetup request.  

Any ideas?  Is there a how-to/wiki page as far as incorporating SSH Dropbear with a genkernel generated initramfs?

----------

## sbraz

Hi,

I also ran into a similar issue. As you noticed, the current script doesn't work (cryptsetup keeps running and blocks the boot process). I've submitted a PR here which will hopefully be merged and fix this: https://github.com/gentoo/genkernel/pull/8

----------

