Config sshd to Use Username and Password for One User
Allow one user SSH access with username/password
Create user if needed:
sudo adduser myusersudo passwd myuser
Manage sshd:
- Make sure
/etc/ssh/sshd_confighasPasswordAuthentication no - At the end of
/etc/ssh/sshd_configadd (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
Read other posts