[root@123schools.blogspot.in~]# cat /etc/services
In the above command, services file display all the service names with associated default port numbers. If you are not using that port then you can select any port.
Open the sshd configuration using a vim editor.vim /etc/ssh/sshd_config
Change from Port 22 to Port 2220 or any other (ex: 2222, 2221, 2028 etc...)
After implementing your required changes, save and quit from the configuration file and restart the ssh service. Service restart as shown below:
[root@123schools.blogspot.in ~]# /etc/init.d/sshd restart
Now you will connect the server using custom ssh port number.
[root@123linuxschool.blogspot.in~]# ssh albin@123schools.blogspot.in -p 2220
No comments:
Post a Comment