Changing the SSH port number

To change the SSH port number login as root and edit /etc/ssh/sshd_config

Find the line that says Port 22 and change 22 to any number between 1024->65535 (above 30000 is best) and save the file

Once done run

/etc/init.d/sshd restart

Now start a new SSH session (don't close your existing one) to make sure that you can get in. If that is ok you can now login on that port. If not change it back. If you get locked out ask support to fix it for you
  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

How do I tell which version of Linux I'm on?

To find out the kernel version you are on run uname -a To find out the OS you are on run...

How do I disable root SSH login?

Login via SSH and edit /etc/ssh/sshd_config Look to see if there is a line like PermitRootLogin...

How to change the hostname?

To change the hostname on your server If you are running C-Panel, Login to WHM and use the...

What ip's should I put in my /etc/resolv.conf?

This should be set for you already, we either use Google DNS or OpenDNS nameservers which...

How do I block an IP?

To block an IP from the command line run /sbin/iptables -I INPUT 1 -s -j DROP This will drop...