Regon
Regon

Reputation: 392

SCP Command in Solaris to file transfer from c#

Is There any way to do following in C#.NET or JAVA,

Get list of files from specific directory of Another pc having solaris OS and transfer file using SCP to another pc which have also solaris OS.

Actually i am thinking about creating front-end in asp.net to transfer backup from Live to backup server and get information about backup.

I even this is possible or not, but I wan't to clear my confusion on this.

Please give me your suggestion.

Upvotes: 0

Views: 614

Answers (1)

peterh
peterh

Reputation: 19285

C# or any other .NET language is specific for Windows and won't run on anything but Windows. So forget about .NET languages. For this type of task I would definitely use Java if you insist on using a programming language at that level.

From Java you can use JSch library. It can do SCP from within Java. Here's is one example.

However I must say that most people that are familiar with Unix/Linux would probably simply do this task from within a scripting environment. Heck it can be done from Bash if you like.

Regardless of your choice of tool/prg.language you'll also have to decide if your doing PUSH or PULL. It seems from your posting that you are most keen on doing a PULL. There's no right or wrong answer on PUSH vs PULL.

Upvotes: 1

Related Questions