Allow one user SSH access with username/password

Create user if needed:

  • sudo adduser myuser
  • sudo passwd myuser

Manage sshd:

  • Make sure /etc/ssh/sshd_config has PasswordAuthentication no
  • At the end of /etc/ssh/sshd_config add (to make the exception):
Match User myuser
    PasswordAuthentication yes
  • Check configuration: sudo sshd -t
  • If no errors, restart sshd. Example ubuntu: sudo service sshd restart

Test with myuser:

  • ssh myuser@host -> a password input request should appear