How can I explicitely set the SFTP server port number?
조회 수: 5 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2023년 7월 14일
답변: MathWorks Support Team
2023년 7월 20일
I am currently working on a project that involves downloading data from an SFTP server. I am using the 'sftp' function to establish the connection. However, I must modify the default port number from 22 to 20 for this specific task. Could you please help me to accomplish this?
채택된 답변
MathWorks Support Team
2023년 7월 14일
As you mentioned, the default port number for SFTP servers is 22. To specify a different port number for the connection, you can append a colon (:) followed by the desired port number to the host. For instance, consider the following command:
s = sftp("www.example.com:20")
opens an anonymous connection to port number 20 if the server "www.example.com" is configured to provide SFTP service.
To find additional information, please consult the documentation page below:
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 FTP File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!