Home / Linux / Changing port of ftp and ssh

Changing port of ftp and ssh

Here is a simple tips to change the default portsof ftp ana ssh.
To change the port of ssh,edit the file/etc/ssh/sshd_config and add the following line:

port 222





Restart the service of ssh to make the changes effective.Now you need to specify the port number using option ‘-p’ whenever you want to access this system.

#ssh localhost -p 222

In order to change the port of ftp server,edit the file/etc/vsftpd/vsftpd.conf

lissten_port=2100 ##add this line

Restart the service of ftp.
Now run the following command tocheck if the listening ports have been changed or not:



ftp localhost 2100

You can even check the open port using the netstat or mmap commands.

Loading Facebook Comments ...
Social Media Auto Publish Powered By : XYZScripts.com