Changing Default SSH port From 22

nano /etc/ssh/sshd_config

Look for

#Port 22

Change "22" to the port you wish to use.

CTRL + X, Save your settings.

service sshd restart

close out SSH and test the connection with the port you chose.

Was this answer helpful?

 Print this Article

Also Read

Linux/UNIX: Configure OpenSSH To Listen On an IPv6 Address

How do I enable OpenSSH SSH server to listen on an IPv6 address under Linux or UNIX operating...

Nginx Block And Deny IP Address OR Network Subnets

How do I block or deny access based on the host name or IP address of the client visiting...

Linux Default Services Which Are Enabled at Boot

Can you provide a guidance on default CentOS / Fedora / RHEL / Redhat enterprise Linux services...

Used And Free Memory

What's going on? Linux is borrowing unused memory for disk caching. This makes it looks like you...

How Do I Block an IP Address on My Linux server?

How do I block an IP address or subnet under Linux operating system? In order to block an IP on...