Proxy settings with custom format (works in Filezilla, but not WinSCP)

Advertisement

jkildedal
Guest

Proxy settings with custom format (works in Filezilla, but not WinSCP)

Hi

I am trying to access an ftp server through a proxy server. I managed to get it working in Filezilla, but cannot get it working in WinSCP. I even tried importing the Filezilla site, but each time I get the response:
Connection failed.
Authentication failed.
Connection failed.
User Access denied.

Usage: USER username@hostname proxyusername
PASS password
ACCT proxypassword

If I use the "Generate Session URL/Code..." option the following settings are revealed:
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Ftp,
    HostName = "proxyhost",
    PortNumber = 21,
    UserName = "username@hostname proxyusername",
};

using (Session session = new Session())
{
    // Connect
    session.Open(sessionOptions);

    // Your code
}

I also tried these sessionOptions which seemed logical, but here I get a timeout.
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Ftp,
    HostName = "hostname",
    PortNumber = 21,
    UserName = "username",
    Password = "password",
};

sessionOptions.AddRawSettings("FtpProxyLogonType", "7");
sessionOptions.AddRawSettings("ProxyHost", "proxyhost");
sessionOptions.AddRawSettings("ProxyUsername", "proxyusername");
sessionOptions.AddRawSettings("ProxyPassword", "proxypassword");

What am I doing wrong and what are the right settings?

Reply with quote

Guest

Hi again

I found a solution... I just needed to do the following:
SessionOptions sessionOptions = new SessionOptions 
{ 
    Protocol = Protocol.Ftp, 
    HostName = "proxyhost", 
    PortNumber = 21, 
    UserName = "username@hostname proxyusername", 
    Password = "password"
}; 

sessionOptions.AddRawSettings("FtpAccount", "proxypassword");

Reply with quote

Advertisement

You can post new topics in this forum