Minimal things needed for SSH login on Debian Linux

Uncategorized , , 1 Comment

I was unable to find a place where all these things are collected, so I have decided I will write it down here.

So I am currently working on a little project where I need to have SSH access during the boot (on the initrd system). The following things are needed to create a working – as far as I know – minimal SSH server:

  • ifconfig – to configure the network interface
  • route – to configure the routing
  • Dropbear SSH server – a very small, and fully functional SSH server, client, keygen
  • /etc/login.defs
  • /etc/passwd, /etc/shadow, /etc/groups – for the authentication
  • /lib/libnss_files* – for the authentication processing
  • /etc/nsswitch.conf with the following content:

    passwd: files
    group: files
    shadow: files
  • /dev/pts – with devpts mounted (mount -t devpts none /dev/pts) for the terminals

On some systems the Dropbear needs a “better entropy device” than /dev/random, so we should symlink /dev/urandom to /dev/random.

And that’s all, everything should be fine now, and should run. I think I will write an another post with the whole “early ssh” thing soon, but I still need testing, and have to clean up my code somewhat.

One thought on “Minimal things needed for SSH login on Debian Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.