0

As stated in the title, are there any existing best practices to install Debian on a remote server, without sending clear text passwords over the link?

For example - a lot of dedicated server providers will give their customers direct access to the KVM of the supermicro board. This gives them a lot of choices - for example, I can mount any local ISO image as if it were in the CD drive.

However, installing Debian would be a no-go, because I'll have to type in the root password during the setup, which an eavesdropper can read too.

My guess would be to create a pre-made installation image, with the SSH public key already installed. You would no longer rely on what's on the KVM screen, but rather connect to the SSH service immediately. You'd still open yourself up to man in the middle attacks, since someone eavesdropping on the KVM connection could copy the public key and the hostkey, and intercept the connection, but I imagine it would be difficult to do in a timely fashion.

Is there any better way I am missing?

  • Let's say you find a solution that prevents them from capturing the password. What's to stop them from reading /etc/shadow off the hard disk or backdooring it in some other way, since they have physical control of it? – multithr3at3d Sep 8 at 22:38
  • If you're worried about your password being stolen, why not using a random password, then changing it other SSH right after installation? Then you can always check if someone messed with your system. – Lou_is Sep 9 at 6:00
  • @multithr3at3d The one thing there to stop them is disk encryption. This also means you need to have a trusted way to key in the password for that, should the server ever restart. The question would be the same though. If we don't consider attackers who freeze memory, and just consider eavesdropping on the line (possibly directly at the server) - how would you get into a dialog with the server without using insecure KVM? – Michael Sep 9 at 14:06
  • @Lou_is The password being stolen might not be the root password, but perhaps a LUKS password. If that one is stolen, the master key can be obtained (possibly from an image), which survives any password changes. – Michael Sep 9 at 14:10
  • Are you worried about sniffing on the network and MITM or a hostile provider employee? If it's only MITM my provider offers public key preloading but on virtual servers. – Jan Dorniak Sep 12 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.