This block of code is intended to open a connection between local machine and an FTP server. The server is hosted by DreamHost and I don't know if the issue is in my configuration for the target DreamHost's server. The code throws WebException
:
530 (Not Logged In)
// Censored, but all the information given are correct
using (FtpClient ftp = new FtpClient("anaconda.dreamhost.com", "******", "******"))
{
ftp.Connect(); // This line
..
..
}
How can I successfully initialize connection to the server?
I have also tried login with FileZilla. It seems to be working fine. The log file follows:
2021-04-25 18:53:41 2404 1 Status: Connecting to anaconda.dreamhost.com...
2021-04-25 18:53:42 2404 1 Response: fzSftp started, protocol_version=10
2021-04-25 18:53:42 2404 1 Command: open "***********@anaconda.dreamhost.com" 2
2021-04-25 18:53:55 2404 1 Status: Using username "********".
2021-04-25 18:53:57 2404 1 Command: Pass: ********
2021-04-25 18:54:00 2404 1 Status: Connected to anaconda.dreamhost.com
2021-04-25 18:54:02 2404 1 Status: Retrieving directory listing...
2021-04-25 18:54:02 2404 1 Command: pwd
2021-04-25 18:54:02 2404 1 Response: Current directory is: "/home/*******"
2021-04-25 18:54:02 2404 1 Command: ls
2021-04-25 18:54:03 2404 1 Status: Listing directory /home/********
2021-04-25 18:54:04 2404 1 Status: Directory listing of "/home/******" successful
I am pretty sure that the issue is in my configuration in the code above.
You are using SFTP in FileZilla, not FTP.
So you have to use SFTP library in your code, not FTP library.