Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


SFTP C# Mono

Posted on 2010-09-15
Medium Priority
Last Modified: 2016-02-19
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?
Question by:Aanvik
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
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?
LVL 12

Expert Comment

by:Mortaza Doulaty
ID: 33689635

Author Comment

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 ?
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

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.

Author Comment

ID: 33693888
Ok.. Thank you.

I know System.Diagnostic.Process class
LVL 12

Accepted Solution

Mortaza Doulaty earned 2000 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

Author Closing Comment

ID: 33855060
It helped.. thank you.

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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