How to change SSH Port in Linux

# vi /etc/ssh/sshd_config
You have to change port 22 to whatever you want
#Port 22 #ta delete kore ja den The max is 65535.

you have to restart sshd file:
# service sshd restart

or

#root-e dhukbo > file transfer > etc > ssh > sshd_config.txt > #Port 22 #ta delet kore ja den
Or
[root@LDS-1 ~]# vi /etc/ssh/sshd_config.txt
# service sshd reload
/etc/init.d/ssh restart
# server sshd restart
Next time remove # from beginning of the line.
After that proceed to restart the service, /etc/init.d/sshd restart.

  • ssh, port, server, linux-server
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Change HostName in CentOS 7 / RHEL 7

Method 1 : nmcli To view the current hostname : # nmcli general hostname...

How to delete terminal history in Linux

You can clear your bash history like this: cat /dev/null > ~/.bash_history && history...

How to install wget on CentOS 7/8

The procedure to install wget command is as follows on CentOS Linux 7/8: Open a terminal...

How to install Webuzo on CentOS 7

Requirements Newly installed CentOS 6.x / 7.x or Red Hat Enterprise Linux 6.x / 7.x or...

How to block IP address on a Linux Server

To block an IP on your Linux server you need to use iptables tools  and netfilter firewall. First...