Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

Is there a way to upload files to a Linux server without FTP. I can create the solution either in C# or Java. Any help on this would be great.

Regards
Sebastian
Posted

1 solution

Use HTTP. You need to have HTTP server on Linux
 
Share this answer
 
Comments
Sebastian T Xavier 26-Sep-12 0:48am    
What if the server don't have HTTP enabled?
manoranjan 26-Sep-12 1:13am    
You need to have 'something' on Linux to receive files. It can be FTP, FTPS, HTTP(S), SSH, RSH server or even your own custom 'receiver' application. You need to decide the appropriate mechanism before creating your program.

File upload thru FTP, SSH (i.e. SFTP or scp), RSH (i.e. rcp) are usually done through a batch file. You will need an appropriate client program. However, you can also find appropriate client libraries (mostly, FTP clients) that you can use in your Java or C# app.

On the other hand, HTTP is well supported in both .NET and Java SDK. Additionally, if you need secure communication, you can easily upgrade to HTTP over SSL (HTTPS).

Of course, if you feel that the overhead of installing (and securing) a http server is too much (and your application is small). Then you can write your own server that will receive files. However, from my experience, small applications turn big quite quickly :). You might be better off using existing infrastructure.

I don't recommend RSH or FTP since password is not encrypted during transmission.

HTH. Good luck!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900