Skip to content

Instantly share code, notes, and snippets.

@opnchaudhary
Created January 18, 2014 12:02
Show Gist options
  • Save opnchaudhary/8489524 to your computer and use it in GitHub Desktop.
Save opnchaudhary/8489524 to your computer and use it in GitHub Desktop.
Configure ssh for some users to use key file and some users to use password
#/etc/ssh/sshd_config
#ec2-user and root uses key file for login
Match User ec2-user,root
PasswordAuthentication no
#testuser uses password for login
Match User testuser
PasswordAuthentication yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment