Modifying SSH port and forbidding root remote login under Linux

August 20, 2016 1105 point heat 0 liked it 0 comments

Linux modifying SSH port 22

vi /etc/ssh/ssh_ config

vi /etc/ssh/sshd_ config

Port 8888 is then changed to 8888

Service sshd restart (RedHat AS3) as root

Using putty, port 8888

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


/usr/sbin/sshd -p 1433


To enhance security

First add a user with normal permissions:

#useradd uploader

#passwd uploader

//Set password


Root remote SSH login is not allowed on the production machine

#vi /etc/ssh/sshd_ config



PermitRootLogin yes

Change to

PermitRootLogin no

Restart the sshd service

#service sshd restart


For remote management, log in as ordinary user uploader, and then switch to root with Su root to get 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 review