how to use sftp command with different port

I am using the Fedora 9 here for this explaination.

I tried to sftp on remote server for port no 2202. I got the following error on command prompt.

[siwan@localhost ~]$ sftp user@example.net -oPort=2202

Connecting to example.net…
ssh: connect to host stylo.smartsourcingglobal.net port 22: No route to host
Couldn’t read packet: Connection reset by peer

Then i tried the following command, than I able to make connection with port

[siwan@localhost ~]$ sftp -oPort=2202 user@example.net


Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.