Shared hosting SSH with public key authentication only

Summary

In October 2007 Manuel Schmitt reports that password login over SSH has been switched off on manitu's shared hosting servers and only public key logins work. The free SSH access already required a written application via a form, yet users kept causing trouble that created work. The new hurdle is meant to keep inexperienced users away and rule out unauthorised third-party logins almost entirely.

What public key login changes

With password login, a reusable secret goes to the server where it can be guessed or captured elsewhere. With public key login according to RFC 4252, the client proves possession of the private key with a signature; the private key never leaves the user's computer.

RFC 4252 makes publickey the only method every SSH implementation must support. In OpenSSH, PasswordAuthentication no switches off password login; according to the manual, KbdInteractiveAuthentication is a separate switch that also defaults to yes.

Ideas

  • Public key authentication removes reusable server passwords from the SSH login path.
  • An additional activation step limits access to deliberately registered users.
  • Password guessing attacks come to nothing with key-only login.
  • Technical hurdles can reduce abuse but must not merely lock out inexperienced users.

Insights

  • Secure defaults work better than voluntary advice to many tenants.
  • Access control should fend off attackers and support legitimate users with good documentation.

Facts

  • SSH was included free of charge in the web hosting packages.
  • Customers also had to apply for SSH access via a form.
  • RFC 4252 mandates publickey as the only required SSH authentication method.
  • OpenSSH allows PasswordAuthentication and KbdInteractiveAuthentication by default.

References

Recommendations

  • Set PasswordAuthentication no and KbdInteractiveAuthentication no together.
  • Verify the switch-off from outside with ssh -o PubkeyAuthentication=no.
  • Document key generation, rotation and loss clearly.

Read the original article on Hostblogger

Search the Web Archive

Found a mistake or have something to add? Get in touch.