1

I'm writing a C# application and whenever I try any FTP action with FtpWebRequest or WebClient I always get "System.Net.WebException: The underlying connection was closed: The server committed a protocol violation." Connecting with a FTP client application (tunnelier) works perfectly well though. In the connection logs Tunnelier mentions 'Starting new SSH2 session' and 'Connecting to SSH2 sever' etc. Also I read mention of SSH causing problems in some ancient threads I found on google so I assume that's the problem I'm having.

I really rather not use third party stuff but If I must I suppose I will.

ForeverNoobie
  • 531
  • 5
  • 17

1 Answers1

5

You are mixing together FTP(FTPS) and SFTP. They are completely different set of protocols. SFTP is not ordinary FTP over SSH, it is anther protocol and you need a side library to work with it.

Nickolay Olshevsky
  • 13,706
  • 1
  • 34
  • 48