Initiating SFTP connections with a non standard port

Network transmit icon from the Tango Desktop ProjectAnother quickie to serve as much as a reminder for me as a how-to post.

If you've configured the SFTP daemon on your target system to use a non-standard port as part of your security precaution mix, you can't pass this port number by appending a colon and the port to the address. Instead, use the SFTP options flag to declare the port:

% sftp -oPort [PORT] (USER@)[ADDRESS]

For example, to connect as user NotBillKurtis to a local server on port 50000 you would enter:

% sftp -oPort 50000 NotBillKurtis@


This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at Thanks :).