Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have a remote host, previously I can ssh into it with root and password

ssh root@remote_host

or I ssh into it first using a regular user account

ssh esolve@remote_host

and then su root and input password

but today, in both ways, my password is always incorrect, like

[esolve@local esolve]$  ssh root@remote_host
root@remote_host's password: 
Permission denied, please try again.


[esolve@remote_host ~]$ su root
su: incorrect password

related information:

  1. I can use this password to log in with root if I operated locally on that remote machine today.

  2. I ssh into is via VPN

Why did this happen? How can I solve this problem?

share|improve this question
If you are able to su root successfully but cannot log in as root via SSH, then the system administrator likely disabled root SSH access which is always a good idea. – j883376 Jun 14 '13 at 19:48

2 Answers 2

up vote 7 down vote accepted

Do you have ssh as root disabled? Check your sshd configuration (possibly /etc/ssh/sshd_config) and look for the line PermitRootLogin no. Change the no to yes and restart sshd (most likely either service ssh restart or service sshd restart).

Some distributions (e.g., Ubuntu) default to without-password for PermitRootLogin such that root login is allowed via public key authentication, but not with a password.

share|improve this answer
what distribution? Also, are you logging in on a local terminal or trying to ssh as root to localhost? PermitRootLogin doesn't care if you start at localhost. – zje Jun 14 '13 at 20:22

For first time if you are access SSH remote server in new system, just update it. Open the ssh configuration file,

# vim /etc/ssh/sshd_config

PermitRootLogin without-password

change to

PermitRootLogin yes

Restart your ssh service.

restart ssh server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.