1

I just created a new server (VM) and I setup SSH, I can login fine. I created another user account, added it to the admin group and sudo works fine.

Now I want tried to disable the root login, so I edited the /etc/ssh/ssh_conf file with:

Host *
PasswordAuthentication no
PermitRootLogin no
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no

(The above lines are all the lines that are commented out).

Note: It didn't have PermitRootLogin so I added it myself manually.

I am running ubuntu 14.04

I can still login using my non-root account, and I can also login with my root login (it asks for the password and then works fine).

I did restart the ssh service, and I also restarted the entire VM just in case.

What could the issue be here?

  • Can you post the output of ssh -vvv root@<vm-ip>? – muru Jun 17 '14 at 16:41
4

You need to change this in /etc/ssh/sshd_config instead. ssh_config settings apply to the client and PermitRootLogin is not applicable to the client (see `man ssh_config for applicable settings).

| improve this answer | |
  • good catch, I forgot the "d" – Blankman Jun 17 '14 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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