X
X

Select Your Currency

$ US Dollar Türk Lirası
X
X

Select Your Currency

$ US Dollar Türk Lirası

Up to 50% Discount on All Hosting Packages

Sign In Sign Up Basket 
0
Sign In Sign Up Basket 
0
Linux
08/07/2021

Changing Linux SSH Port

You can change the default "22" ssh port to a port number of your choice in order to be protected from brute force login/login attempts on the Linux platform. In this article, we will take the ssh port of our centos/linux server from 22 to 9994. In this way, we will be protected from ssh brute force login/login attempts.

nano -w /etc/ssh/sshd_config

If there is # at the beginning instead of #Port 22, we write Port 9994 and save CTRL+X and exit;

We add port 9994 to iptables;
 
service iptables stop
iptables -A INPUT -p tcp --dport 9994 -j ACCEPT
service iptables save
service iptables start
 
If you are using centos 7, you can open a port for firewalld as follows;
 
 
firewall-cmd --permanent --zone=public --add-port=9994/tcp
firewall-cmd --reload
 
We restart the ssh service;
 
service sshd restart
 
It is no longer possible to access ssh from port 22. We can access it with port 9994.

Popular Topics

Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Changing Linux SSH Port

Lorem Ipsum is simply dummy text of the printing and typesetting indu...

Tamamını Görüntüle
Linux Plesk Installation

Lorem Ipsum is simply dummy text of the printing and typesetting indu...

Tamamını Görüntüle
Allowing Plesk Remote MySQL Connection

Lorem Ipsum is simply dummy text of the printing and typesetting indu...

Tamamını Görüntüle
Centos 7 Hostname Replacement

Lorem Ipsum is simply dummy text of the printing and typesetting indu...

Tamamını Görüntüle
How to update cPanel?

Lorem Ipsum is simply dummy text of the printing and typesetting indu...

Tamamını Görüntüle
CentOS 8 Installation With Screenshots

Lorem Ipsum is simply dummy text of the printing and typesetting indu...

Tamamını Görüntüle