Questions tagged [sharpssh]

SharpSSH is a .NET framework library for connecting to and retrieving files from an SSH/SFTP server.

SharpSSH is a .NET framework library for connecting to and retrieving files from an SSH/SFTP server. SharpSSH has originally designed by Tamir Gal as a direct port from the Java library at Code Project.

As the SharpSSH has not been maintained in several years, it should not be considered for new projects, as it does not support the recent algorithms.

104 questions
2
votes
1 answer

How to connect SFTP With Public Key and Private Key File with Passphrase through codebehind C# SharpSsh

How can I set Public key File and Private key File with Pass-phrase. Also I need to accept the fingerprint sent by the connecting sftp. I am using Tamir.SharpSsh source. Is it possible to incorporate there in the source ? Please suggest.
2
votes
2 answers

sharpssh "session is down" during concurrent connections

I'm integrating SharpSSH in on existing .NET 2.0 project. So can't switch to http://sshnet.codeplex.com/ or other newer library... I have everything working for a single connection with a device and can run commands and upload files without…
Frank
  • 5,741
  • 4
  • 28
  • 49
2
votes
1 answer

set Sharpssh sftp connection timeout

I am using sharpssh.dll and want to connect to a sftp server, but if the sftp server is diconnected from network, the program will wait for a long time before "timeout" message is shown, is there anyway to set a timeout sharpssh?
User2012384
  • 4,769
  • 16
  • 70
  • 106
2
votes
1 answer

Get a remote file on SFTP with only knowing part of the file name

Okay, well I have the whole file name but the client decided to include timestamps to the end of each name so it really got me confused on how to do this. It was previously a static name plus the current date.. e.g. CompanyNameOBound2012224.zip I…
dright
  • 613
  • 1
  • 9
  • 19
1
vote
1 answer

SharpSSH - setting connection "trust" to true

There have been plenty of articles on using the SharpSSH component but i nonetheless want to ask this as i cannot find the answer from the gazillion articles and blog posts over the net and at stacko. I am getting an error as follows: "reject…
Zen Pak
  • 578
  • 6
  • 22
1
vote
1 answer

Using SSH private key 1.1 on Tamir .Net SSH library

I'm tasked with replacing a Unix Java application that loads files onto a SSH server with a C#.Net application using Tamir's OpenSSH library. The SSH server accepts a key that uses "SSH PRIVATE KEY FILE FORMAT 1.1", which Tamir's library doesn't…
Foozinator
  • 400
  • 3
  • 11
1
vote
1 answer

Use SharpSSH to download a file from a SFTP server?

I am using SharpSSH (http://www.tamirgal.com/blog/page/SharpSSH.aspx) to upload a file to some sftp server. This works nice. Now I want to download a file and I guess the Get method can be used for that. Thats my code: Sftp sftp = new Sftp(ip, user,…
grady
  • 12,281
  • 28
  • 71
  • 110
1
vote
0 answers

SharpSSH shell thread dies on Read()

I'm attempted to use SharpSSH's SSHShell class, but the thread dies somewhere in the stream on a read when the buffer is empty. Looks like they use PipeInputStream for the stream. I'm calling the read and write from same thread. That might be the…
1
vote
1 answer

SSH command from C# client redirecting files

The original Unix implementation simply did something like this: ssh [batchname] < [inputfilename] > [outputfilename] I need to be able to do the same thing from a windows machine running an application written in C#. I've tried using SharpSsh,…
Foozinator
  • 400
  • 3
  • 11
1
vote
1 answer

SharpSSH: The requested name is valid, but no data of the requested type was found

I'm trying to connect to SFTP server using SharpSSH, and getting exception - Tamir.SharpSsh.jsch.JSchException: System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found My code looks like…
1
vote
1 answer

Upload all files matching wildcard to SFTP

I am using Tamir SharpSSH for transferring files from remote to local and vice versa with no issues. But, when trying to upload multiple XML files via SFTP but I am receiving an error: Illegal characters in path. If I try to upload using the…
Kiran V
  • 69
  • 5
  • 16
1
vote
1 answer

Error while using sharpSSH in C# for multiple buttons

I have 2 buttons, Connect and Send Command. In the first button I am creating the connection to my server and in the second sending a command. The codes are as below: public void button1_Click(object sender, EventArgs e) { SshExec shell = new…
1
vote
1 answer

send key like Ctrl+A in ssh with SharpSsh

I write a simple code with Tamir.SharpSsh to SSH connect : SshStream ssh = new SshStream(txt_ip.Text, txt_user.Text, "foo"); var output = ssh.ReadResponse(); After successfuly connect to client, i want to send some key directly to client, Anyone…
Ali
  • 3,373
  • 5
  • 42
  • 54
1
vote
2 answers

SharpSSH with Persistent ShellExec connections

I'm using SharpSSH to connect to an SSH server and I've tried using both SshShell and SshExec. I need to be able to take a series of commands and send them to the server in order, so SshShell doesn't really do what I need since I would have to…
Adam Haile
  • 30,705
  • 58
  • 191
  • 286
1
vote
1 answer

Update GUI in realtime

I am using SharpSSH to send command from windows form to one of the linux machine. Everything is working as expected except that I am not able to update the output in real time. Output appears once the command execution is complete. How can I…
Amrit Sharma
  • 1,906
  • 8
  • 45
  • 75