Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 8101  / 1 Year ago, thu, december 8, 2022, 11:59:00

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?


More From » ssh

 Answers
7

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).


[#24582] Friday, December 9, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rmiend

Total Points: 292
Total Questions: 101
Total Answers: 111

Location: Azerbaijan
Member since Tue, Aug 9, 2022
2 Years ago
rmiend questions
Tue, Jan 18, 22, 23:52, 2 Years ago
Sat, Sep 17, 22, 15:44, 2 Years ago
;