-1

Screenshot of the problem here

ssh [email protected]

[email protected]'s password:

Permission denied,please try again .

I'm not allowed to use the ssh [email protected] ,for some reason it won't let me do that .

3
  • 3
    I suspect that either you have got the password wrong, or the sshd server setup on 10.0.2.15 does not allow a root ssh logon. See /etc/sshd_config and look at the PermitRootLogin parameter. The default on my system prevents root from logging in via a password. Jan 22, 2017 at 10:23
  • I changed the PermitRootLogin to yes and it still will not let me login. Jan 22, 2017 at 11:11
  • Remote machine is running Ubuntu? If yes, have you created a root password? Ubuntu root account is disabled by default check this.
    – dgonzalez
    Jan 23, 2017 at 2:31

2 Answers 2

0

You are seeing permission denied problem because you are maybe typing wrong password for root user. For example:

ssh [email protected]
Permission denied, please try again.

[email protected]'s password: 
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 2.6.32-042stab113.17 x86_64)

 * Documentation:  https://help.ubuntu.com/
Last login: Fri Jan 20 07:28:57 2017 from 109.175.99.154

In the first login prompt, I intentionally typed wrong password and got the response as you have. In the second one, I typed correct password and managed to login.

If you are sure the password is correct, this situation can also happen if user root is locked. In that case, there is no correct password for it, since no password is set for that user.

If you have access to user other than root, try logging in with it. If not, access that host somehow else and create another user or set the password for root (from my experience, it is better to use other users).

EDIT: As suggested by Nick Sillito in the comment, it is also possible that it is forbidden to ssh using root. Check your settings as suggested.

3
  • I know the password is correct ,it still won't accept the right password, I think account the is locked.. Jan 22, 2017 at 10:25
  • 1
    @ebatinstitute - you may find instructions on checking that here: askubuntu.com/questions/584847/… Jan 22, 2017 at 10:32
  • I changed the PermitRootLogin to yes and it still will not let me login Jan 22, 2017 at 11:40
0

Take note that the password for the root user is unset by default, and it is different from the user you created on installation.

Since you have permitted root login in your config, do make sure you have also set the password for root.

sudo -u root passwd

Let me know if this solves the issue.

8
  • Nope that didn't help, I'm still getting the same problem Jan 22, 2017 at 12:06
  • Have you commented out this line?: PermitRootLogin without-password and restarted the sshd service: sudo systemctl restart sshd.service
    – loongyh
    Jan 22, 2017 at 12:11
  • Take a look at this question, may be worth a shot attempting the solutions ;)
    – loongyh
    Jan 22, 2017 at 12:14
  • I did that and I got this ssh: connect to host 10.0.2.15 port 22: Connection refused Jan 22, 2017 at 12:22
  • Are you on the same LAN or connecting over VPN?
    – loongyh
    Jan 22, 2017 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .