C# SFTP upload files

后端 未结 2 1281
[愿得一人]
[愿得一人] 2021-01-31 05:27

I am trying to upload files to a linux server but I am getting an error saying: \"Unable to connect to the remote server\". I dont know if my code is wrong or the

2条回答
  •  情歌与酒
    2021-01-31 05:36

    What you are trying to do here is to establish a FTPS connection which is not a SFTP connection. The EnableSsl option only activates FTP over TLS (so FTPS). It uses Port 21 to connect to the server.

    If you really have activated SFTP in FileZilla, you have to use an SSH connection on port 22 to connect to the server (SFTP = SSH File Transfer Protocol). The easiest method to obtain this should be using SharpSSH.

    You can also take a look into this question.

提交回复
热议问题