Adding a New User (Sudoer) & SSH Key in Ubuntu

Right now I’m having to create multiple users on multiple Ubuntu instances, I hope the following steps will be of use to someone. Although it’s for Ubuntu it should be the same process for all Linux and most *nix OS’s. Just replace foobar with your own username.

If you have an exisiting private / public keypair that you want to use (you can use Nano too):

If you want to create a new keypair:

The following command will correctly set the permission and file/directory owner.

Additional step if you want, the below changes the default shell to bash.

Write a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.