Search This Blog

Thursday, July 13, 2017

unable to ssh as root without password

sed -i -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

sed -i -e 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config

systemctl restart sshd

1. change the "#PermitRootLogin prohibit-password" to "PermitRootLogin yes"

- This means changing the default behavior of not allowing the Root login (only with)  -> allowing the root login

more info

 * The default for the sshd_config(5) PermitRootLogin option has
   changed from "yes" to "prohibit-password".

 * PermitRootLogin=without-password/prohibit-password now bans all
   interactive authentication methods, allowing only public-key,
   hostbased and GSSAPI authentication (previously it permitted
   keyboard-interactive and password-less authentication if those
   were enabled).

With that configuration you cannot login in as root with a password. Use keys instead.

2. change "#PermitEmptyPasswords no" to "PermitEmptyPasswords yes" as in your case root does not have any password

3. restart the sshd daemon 

1 comment:

endy smith said...

I have a friend who is really first rate programmer and I know that on line edit agency essay corrector org he will help me to sort the things out.