Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LUKS root+ SSH?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Wed Mar 10, 2010 7:40 am    Post subject: LUKS root+ SSH? Reply with quote

Hi,

is there any way to decrypt a LUKS rootfs via ssh? (ie. compiling some ssh server into the initrd)
Back to top
View user's profile Send private message
malern
Apprentice
Apprentice


Joined: 19 Oct 2006
Posts: 170

PostPosted: Wed Mar 10, 2010 11:50 am    Post subject: Reply with quote

Yes, you've answered your own question really :). Statically compile a ssh server (net-misc/dropbear would be a good choice), add it to your initrd, modify the init script to setup the network and launch the server. Then, when the machine boots, connect with your ssh client and specify your LUKS passphrase.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Wed Mar 10, 2010 12:25 pm    Post subject: Reply with quote

in that case I would need to setup as /dev/mapper/root and then just end the login to continue booting, right?
Back to top
View user's profile Send private message
malern
Apprentice
Apprentice


Joined: 19 Oct 2006
Posts: 170

PostPosted: Wed Mar 10, 2010 3:25 pm    Post subject: Reply with quote

It really depends how you code your init script, you can make it work however you want. I don't think it would be hard to make it wait for the ssh connection to close, and then finish up by mounting your encrypted partition and calling switch_root on it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum