Skip to end of metadata
Go to start of metadata

These steps will let the user that you create ssh to a running instance using a password you set.  The user can reset the password once they login and/or add their ssh keys.

Step-by-step guide

All steps to be run as root or using sudo.

  1. Run 'adduser username'
  2. Run 'passwd username' and assign a temporary password
  3. Run 'usermod -a -G users username'
Notes

If you have the user's public SSH key, do the following:

  1. Run 'mkdir ~username/.ssh/'

  2. Run 'chmod 700 ~username/.ssh/'
  3. Run 'chown username:username ~username/.ssh/'
  4. Copy the user's public ssh into ~username/.ssh/ or use an editor to create the file authorized_keys in that directory and paste the contents of their public SSH into that file
  5. Run 'chown username:username ~username/.ssh/authorized_keys'

If you do not have the user's public SSH key, you will also need to do these steps. It is best, from a security standpoint, to ONLY allow public key access.

  1. Edit /etc/ssh/sshd_config and add the line PasswordAuthentication yes and then save the file
  2. Restart sshd ('service sshd restart' for CentOS 6, 'service ssh restart' for Ubuntu 14.04 systems, -OR- 'systemctl sshd restart' for CentOS 7)