Setting Up Unix Users - Putty Login Problem - Sudo Error

dreamcompute

#1

Greetings,

I just launched DreamCompute and installed Ubuntu 16.04. My instance is called “Home”. I’m following a tutorial and added a new user called “testuser”

Question 1:
However, when I open Putty up and try logging into the server using “testuser”, I get an error: Server Refused Our Key. I’m using the same key that I use for my admin “ubuntu” user, which logs in fine.

How can I set it up like Dreamhost does, so I can login through Putty using different usernames?

Question 2:
When I do various commands in the shell as the admin user, for example: “sudo adduser testuser” , I keep getting the same error: “sudo: unable to resolve host home”, even though the command still works. How do I fix this?

Thanks
Kind regards


#2

Search for passwordless login. Each user has its own keys, so you’ll need to generate them and install them for each user.

When troubleshooting an error message, search for that message. In this case, you’ll find answers and explanations. :slight_smile:


#3

Thanks for the help. I was able to find the solution to fix this error message (simple) and did some research into “passwordless login” and I’m now able to login through putty with a test user! I had no idea each user is supposed to have keys to login through Putty. In the past with Dreamhost VPS panel, I’ll create a username and password for each website, and it just works with putty. Maybe I just had one on Putty configured and it works for all of my Dreamhost website usernames (which are all on the same server).

The neat thing is I used my test username and password on my SFTP program and it logs into my server’s IP successfully without a key. Shouldn’t that also work on Putty, or does Putty always require a key?


#4

DreamHost introduces a level of abstraction in how users work, so it is easier for most folks that just need a website, and don’t need to admin a server to do so. As you are learning how to operate your own server, let go of what DH or any web panel does. :slight_smile:

BTW, you mentioning PuTTY made me think DH probably has some docs on that, and they do!


Hmmm, maybe. It is common to have more restrictions on shell access, as it is easier to elevate privileges or mess something up. That makes ssh a target for brute-force password attacks, whereas sftp is used for less sensitive access, and wider use. This is all to explain that it is possible to have access permissions set for different services (ssh and sftp are programs running on your server).

That should give you enough to search for a way to check and change that.

I am unsure as to your exact setup because I don’t use PuTTY or SFTP. You may not be able to switch terminal apps, but I recommend you learn to use ssh, and specifically scp (secure copy), which does all the stuff SFTP does, but faster and more consistent with other processes you’ll use to maintain the server.


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.