Solved

SFTP C# Mono

Posted on 2010-09-15
7
1,902 Views
Last Modified: 2016-02-19
Hello,
I would like to develop a simple C# code (for a Linux server) using MONO ... to open a sftp connection... put the file and close the connection....
Here's what I am currently doing on Linux manually

sftp fts@trl001
connect to fts@trl001
sftp> Put <some file name>
sftp> bye

I just do these 3 command manually and I was  thinking of writing a C# program on Linux to do this for me...

Any help?
0
Comment
Question by:Aanvik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 12

Expert Comment

by:Mortaza Doulaty
ID: 33689615
Do you want to do it using sftp command, or you would like to do it in a different way?
0
 
LVL 12

Expert Comment

by:Mortaza Doulaty
ID: 33689635
0
 
LVL 5

Author Comment

by:Aanvik
ID: 33691099
In case of using sftp command, you can create a new process and pass the arguments to that process.


Can you pls provide some more details here pls... So in case I use this I won;t have to use these products... correct ?
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 12

Expert Comment

by:Mortaza Doulaty
ID: 33693766
In case of using sftp command, you won't need those things.

Have a look at System.Diagnostic.Process class.
Also check the sftp command's manual to check how you can pass those parameters to sftp command all in one argument.
0
 
LVL 5

Author Comment

by:Aanvik
ID: 33693888
Ok.. Thank you.

I know System.Diagnostic.Process class
System.Diagnostic.Process.Start(What)
0
 
LVL 12

Accepted Solution

by:
Mortaza Doulaty earned 500 total points
ID: 33702944
You just need to instantiate a variable of  System.Diagnostic.Process class.
Then you need to adjust the values of SartInfo.
Have a look at http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
0
 
LVL 5

Author Closing Comment

by:Aanvik
ID: 33855060
It helped.. thank you.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question