I’ve followed the tutorial on setting up my droplet and installed a SSH key while creating my droplet. Since I’m using Windows, I have been using PuTTY to connect to my server; but I always log in as the root user and not the non-root sudo user I created. How do I create a profile on PuTTY that uses my sudo user instead?
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.
when saving session in PuTTY, click data from the left panel and put the non-root username in auto-login username field and save.
@KivxD
Which tutorial did you follow?
I’ll use
username
as the username in this example.1). Create the users
home
directory and the.ssh
directory where we’ll store the users’ key.2). Add the user and set their home directory to the one we just created.
3). Add the user to the
sudo
group.4). Create our
authorized_keys
file.5). Setup proper permissions on the
.ssh
directory,authorized_keys
file, and home directory.6). Now you need to paste in your public key to the
authorized_keys
file located here:At this point, you should be able to login via SSH if everything is configured correctly.