How do I login with created non-root user (Win, PuTTY)

I’m not well skilled when it comes to setting up drolets but I’m learning by myself and following the amazing tutorials here and on the web. I just created a droplet and SSH keys for login in via PuTTY.

One DO tutorial recommends making a non-root user so I created another user, and another set of SSH key for that user. But my PuTTY login always brings me up to root@mydroplet, and if I want to switch to non-root I have to do ssh non-root@mydroplet

How do I setup PuTTY so it logs me in as non-root user every time?

Also, one tutorial suggests that when creating a non-root user I should grant admin privileges by executing the following

   # adduser <YOUR USERNAME>
    # groupadd admin
    # usermod -a -G admin <YOUR ADMIN USERNAME>

I’m bit confused, Your Username is (i presume) non-root user that I created, but Admin Username? I didn’t setup any admin usernames. Is it Root?

Thanks :)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


Instead of adduser you can use useradd which will add both the user and the group at the same time (thus reducing the number of commands you need to run).

In the example you’ve referenced, they are telling you to run the first command to add a user to the system. The second command adds a group named admin. The third command adds the user you created in the first command to the group you created in the second command. That’s the most basic way to explain it :-).

You can, however, do the exact same thing by running:

useradd -d /path/to/home username



A command to add users to the server/system.


Allows you to specify the users home directory. As an example, if you’d like for a users home to be set to /home/username/htdocs, you’d pass -d /home/username/htdocs.


Is simply any username that you’d like to add :-). It could be newuser, myuser, gandolf etc. As long as the username doesn’t already exist on the system, you can add it.

So if we wanted to create a new user, gandolf, as an example, we could run:

useradd -d /home/gandolf/htdocs gandolf

This will:

1). Create a new user with the username gandolf 2). Create a new group with the group name gandolf 3). If the directory does not exist already, create a new directory /home/gandolf/htdocs

Now, this user is not able to login just yet because he doesn’t have a password, so we need to issue one using passwd.

passwd gandolf

You’ll now be prompted to set a password and once you hit enter, asked to reconfirm by entering the same password again. Keep in mind, whatever you type in when asked to set and confirm the password will be invisible (i.e. you won’t be able to see what you’re typing), so make sure you key in carefully.

That said, if you mess it up, you can always run the same command again to change it.