SSH to Ubuntu "Access Denied"

Greggzy

Honorable
Dec 27, 2013
28
0
10,540
Hey guys,
So I have finally configured my Ubuntu box (Picked up an old Aspire Desktop and stuck Ubuntu on) and I plan to run it as a gaming server. It's currently sitting downstairs. I have a little monitor connected up but would be perfect if I could run an SSH session to do everything from my Win8 PC.

Now I am not much of a "Network Geek" so i'm not too sure how it all works. But I am unable to use PuTTy to login with the user I want. For example, my user is Matthew and the server is "Linux-Server". So when I connect in with Matthew@Linux-Server it prompts me for password. I enter it and I get access denied. However, when I connect with Root@Linux-Server and enter the same password it lets me straight in. But obviously I don't want everything ran as root.

Any ideas on why I am getting access denied with the Matthew@... user?
 
Solution
Hmm, I can't help that much. SSH works fine for my normal account.

Make sure you've got correct capitalisation on the user name; Matthew would be a different account to matthew, and would silently fail to prevent leaking information on which users exist.

Remember that you have both a short and long username; short is by default a lowercase version of your first name.
 


You must enable cleartext password logins. These are disabled by default in Ubuntu (except for root, because by default root has a disabled login and can only be accessed via sudo elevation)

If you are running the desktop version of Ubuntu you must first install `openssh-server`.

Edit /etc/ssh/sshd_config

scroll down to the line `#PasswordAuthentication yes` and remove the # symbol. Save the file and restart the `ssh` service by typing `sudo service ssh restart`

You should be good to go.

However, a better approach is to create a public-private keypair which can be used for authentication. That's the preferred way to perform remote logins as multiple individuals can be granted access to a single user account without revealing their private keys
 
Solution