DEV Community

k@k
k@k

Posted on

1

How to upload file in FTP/SFTP using C#/.Net?

Can you please any one help me........

Top comments (1)

Collapse
 
andreasjakof profile image
Andreas Jakof • Edited

Very boiled down:
For FTP you make a TCP Connection to the Server on Port 21.
Use the FTP-Commands to create the data channel. Open another TCP Connection to the returned port and copy the file‘s bytes to the stream.

SFTP uses SSH as transport layer instead of raw TCP Sockets, open the connection per SSH using one of the few SSH Nuget Packages.

Alternatively you could use a NuGet Package for a FTP Client.

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay