By Colin
Hi all,
I am new to setting up a vps and would be grateful if someone could advise me on the following please:
I have read the setting up a vps beginners tutorial and I have understood how to log in to root via ssh keys. I have added ssh key in digital ocean portal and that all seemed to work fine.
I can log in via putty to root without any password
My problem is when adding a new user:
I can add the user fine, but adding ssh keys to the new sudo user is were iam stuck.
Thanks in advance
Colin
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!
Hi Colin,
Which server do you use? Ubuntu ? For now I will assume it is a Linux based server.
since you are using putty and also have putty gen installed you can create a key pair with puttygen.
Login to your new user account or switch to it from within your root login (# su newuser)
a) Create .ssh directory and apply proper permissions
b) Create the file to store your public get in and apply permissions
c) From your puttygen window right click on the public key string select all and copy. Make sure to safe the private key to your computer
d) Back to your console edit the authorized_keys file and paste your public key into it
e) Either point to the private key within putty or launch pagent and load your private key in.
Note: With the pagent running you don’t need to reference the private key within your putty session. just ip and user.
f) Use putty and login using your new user name instead of root
This should do it, sir.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.