Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


titleAfter you create the User

Determine if you have a user's public SSH key and/or will use passwords.

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

  1. Create the users .ssh directory:  mkdir ~<username>/.ssh/

  2. Set the permissions on this directory:  chmod 700 ~<username>/.ssh/
  3. Set the user to own this directory: chown <username>:<username> ~<username>/.ssh/
  4. Authorize the key: Copy the user's public ssh into ~<username>/.ssh/ and use an editor to create/edit the file authorized_keys in that directory and paste the contents of their public SSH into that file
  5. Set the permissions to the authorization file:  chown <username>:<username> ~<username>/.ssh/authorized_keys


• Do these steps to enable password use. It is best, from a security standpoint, to ONLY allow public key access, as above.

  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 restart sshd restart' for CentOS 7 and Ubuntu 16/18)