33

I have a user without a password set (i.e. passwd -d).

I would not like to use public keys on this setup.

Is there a way to SSH login to such a user?

slhck
  • 235,242
user53335
  • 377

4 Answers4

27

PermitEmptyPasswords yes then restart sshd ?

3

Allow PermitEmptyPasswords in sshd_config and restart sshd.

user53335
  • 377
2

If you just want to become the user in question, the simplest way is to log in as some other user (via ssh) and su $username. This requires root privilegies, but you could put the command in /etc/sudoers and only let your user execute that command as root.

If you really want to login through ssh (or remotely in some other way), you need to pick one of the following:

  • Let anyone anywhere (or at least on the network you're on) login.
  • Use a password to restrict who can login.
  • Use certificates to restrict who can login. For ssh directly, this means a public/private key pair, either the ssh-style rsa pair or x509 (like for other ssl stuff).
Eroen
  • 6,561
0

You need to do all of the following:

  • Set PermitRootLogin yes and PermitEmptyPasswords yes in /etc/ssh/sshd_config
  • Set StrictModes yes in /etc/ssh/sshd_config
  • Add ssh to /etc/securetty
  • service ssh restart
Piffre
  • 101