Modify the ssh port and disable root remote login under Linux

August 20, 2016 1435 point heat 0 likes 0 comments

Linux modifying ssh port 22

vi /etc/ssh/ssh_ config

vi /etc/ssh/sshd_ config

Then change to port 8888

Service sshd restart as root (redhat as3)

Use putty, port 8888

The default port of SSH under Linux is 22. For security reasons, the port of SSH is now modified to 1433. The modification method is as follows:


/usr/sbin/sshd -p 1433


For enhanced security

First add a user with normal permissions:

#useradd uploader

#passwd uploader

//Set Password


The production machine prohibits ROOT remote SSH login:

#vi /etc/ssh/sshd_ config



PermitRootLogin yes

Change to

PermitRootLogin no

Restart the sshd service

#service sshd restart


For remote management, use the ordinary user uploader to log in, and then use su root to switch to the root user to obtain the highest authority

#Reprinted from the network, for personal study only


If life is just like the first sight, what is the sad autumn wind painting fan

Article comments