Sign in with
Sign up | Sign in
Your question
Solved

SSH to Ubuntu "Access Denied"

Tags:
  • Linux
  • Servers
  • Ubuntu
Last response: in Linux/Free BSD
Share
May 26, 2014 6:18:34 AM

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?

More about : ssh ubuntu access denied

a b 5 Linux
May 26, 2014 6:34:43 AM

Ubuntu doesn't appear to have an SSH server installed/enabled by default (unless you're using Ubuntu Server Edition).

What are you using?
m
0
l
Related resources
a b 5 Linux
May 26, 2014 6:45:47 AM

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.
m
0
l

Best solution

a b 5 Linux
May 28, 2014 12:52:29 AM

Greggzy said:
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?


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
Share
!