Author Topic: Disable root ssh?  (Read 12448 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Disable root ssh?
« on: January 05, 2016, 05:22:58 PM »
Hello All,

The How to forum looks like the best option for my question. I apologize that it isn't a straight How to, but more of a should I/could I discussion. Prior to using the centos-panel, I had root login to ssh disabled and used sudo. I now have root enabled but working with the panel now, I really am rarely needing to use ssh. I see from the security logs/email notices that IPs from China are hammering away at my root account trying to guess the password (and getting blocked thanks to CWP security measures). Should I worry about this? Is it possible to disable root login with CWP working and/or is it even needed?

Thank you for your input!

PS. Really loving CWP and wishing I'd found it earlier.

Offline
*
Re: Disable root ssh?
« Reply #1 on: January 05, 2016, 05:59:24 PM »
edit /etc/ssh/sshd_config and add/change/uncomment the following line to:
PermitRootLogin no

Offline
*
Re: Disable root ssh?
« Reply #2 on: January 17, 2016, 01:47:43 AM »
also the best security would be to change the ssh port in the same file.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: Disable root ssh?
« Reply #3 on: August 29, 2019, 11:40:16 PM »
WARNING: Security vulnerability! Your server is using default SSH Port 22, to make your server more secure change SSH port in config file /etc/ssh/sshd_config and in CSF firewall !
After changes are done don't forget to restart SSH and CSF Firewall.

I get this warning every time I enter the panel, but I have ssh disabled, why do I get it?
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

HostKey / etc / ssh / ssh_host_rsa_key
#HostKey / etc / ssh / ssh_host_dsa_key
HostKey / etc / ssh / ssh_host_ecdsa_key
HostKey / etc / ssh / ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10