Port Sftp Specify
The first way wouldn t work.
Port sftp specify. So it is different than ftp mechanism. Specifying ssh port number on the command line. As stated previous sftp is a function of the ssh protocol. It is easy to connect to a non default port using ssh and scp.
This is done in part for security reasons. The p port option can be used to specify the port number to connect to when using the ssh command on linux. How can i sftp with a specified port port 10022. For ssh use the p flag to specify which port to connect to.
Port 21 is considered the default control connection port for ftp connections port 990 is the accepted default control connection port for ftps using these default ports is not mandatory the administrator is free to change the listener to use any free port on the system as the listening port. Doing open then the command on the second line works but the server is down atm. Ie this i think is what works ftp. Capital p option can be used with sftp and scp.
We have to specify remote sftp server port explicitly with the p option and ports number to the sftp command. Sftp will use your ssh config file just as ssh does so you can hardcode the port so you don t have to type it in everytime. The p port note. The ssh port number command line setting overrides any value configured in configuration files.
I tried sftp hostname 10022 did not work i tried sftp p 10022 hostname did not work thanks in advance.