Modify SSH ports and disable root remote login settings in Linux
View the system version below
[Email protected] ~]# cat/etc/redhat-release
CentOS Release 6.7 (Final)
Modifying a configuration file
Linux Modify Port
vim /etc/ssh/sshd_config
Find #port
Remove the previous # and then modify port 1234
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9B/AE/wKiom1ll2nOBTfZVAAANOYt0oEw047.png "title=" 11. PNG "alt=" Wkiom1ll2nobtfzvaaanoyt0oew047.png "/>
Restart The service is OK
service sshd restart
or
/etc/init.d/ssh restart
to enhance security
first add a user with normal permissions and set the password
useradd test
passwd test
then disable root remote SSH login:
vim /etc/ssh/sshd_config
put one of the
PermitRootLogin yes
instead
PermitRootLogin no
650) this.width=650;" src="https://s3.51cto.com/wyfs02/M00/9B/AE/wKioL1ll2tSh-vgqAAALAx9ISbc476.png" title="11.PNG" alt="wKioL1ll2tSh-vgqAAALAx9ISbc476.png" />
Restarting the sshd service
service sshd restart
or
/etc/init.d/ssh restart
remote management with ordinary user test login, and then use SU root to switch to the root user can get the highest privileges!
This article is from the "Hand of the Paladin Control" blog, please make sure to keep this source http://wutengfei.blog.51cto.com/10942117/1946764
Modify SSH ports and disable root remote login settings in Linux