Create a User with SSH access in ubuntu 16.04

Several times administrating servers you need to create a new user for doing tasks that need to be done by external entities.

Usually when you create a new server, you get root access, or admin access enought to login and to install and configure stuff.

Is not a good Practice to start giving administrative access to external entities, so this is a way of creating a new user, set a password and allow him to log in.

As root or admin user we create a new user

adduser <user-name>

The system it’s gonna ask you the password, name and some other fields, then we switch to the user that we just created:

sudo su - <user-name>

As root, make sure in the sshd_config file the line to allow ssh auth with password is set to “yes”

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes

Then restart the ssh daemon

service ssh restart





Contact Us

Adress: 66 W Flagler St, Miami, Florida
Phone: +1 (786) 991-3467

© 2020 Cobuild Lab All Rights Reserved.