How to SFTP if the default ssh port is changed
Usually if the SFTP is enabled in your server, it will try to use the default port SSH port 22 even though the SSH port is changed to some other custom port.
Here the SSH port is changed to 2200 instead of 22. But SFTP tries to connect it with 22. In this case we can connect to SFTP with the custom SSH port by running the following command.
http://kb.bobcares.com
root@localhost/~$sftp root@
Connecting to ...
ssh: connect to host port 22: Connection refused
Couldn't read packet: Connection reset by peer
Here the SSH port is changed to 2200 instead of 22. But SFTP tries to connect it with 22. In this case we can connect to SFTP with the custom SSH port by running the following command.
root@localhost/~$sftp -oPort=2200 root@
Connecting to ...
root@'s password:
sftp>
http://kb.bobcares.com