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
35
votes
4 answers

Get current user's credentials object in Powershell without prompting

I have a Powershell script that is going to be run through an automation tool against multiple servers. It works fine on Windows machines, as the remote calls use the tool's service account without any need for prompting or exposing any credentials…
Beege
  • 365
  • 1
  • 3
  • 6
19
votes
1 answer

SharpSSH invalid privatekey

I use SharpSSH to connect to a stfp-server. This for I need to add a privatekey-file like this: sftp.AddIdentityFile(KeyFilePath); But this throws an exception: invaid privatekey: C:\KeyFile\privatekey_2.ppk The file was created with puttygen and…
abc
  • 2,285
  • 5
  • 29
  • 64
15
votes
2 answers

"The requested name is valid, but no data of the requested type was found" when connecting to SFTP with SharpSsh

I have to download some files from a SFTP location. I am using the SharpSsh libraries but I am unable to connect. Below are my SFTP details :
Pawan Agrawal
  • 263
  • 2
  • 4
  • 11
15
votes
4 answers

How to delete a file from a SFTP server programmatically using SharpSSH?

How to delete a file from a SFTP server using Tamir Gal's SharpSSH? I have been able to accomplish other functionality but deletion.
Joe Allen
  • 151
  • 1
  • 1
  • 3
7
votes
5 answers

SFTP connectivity DNS issue - System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found

I am trying to connect to ftp via SharpSSH as below: Sftp Connection = new Sftp(ftpAddress, FTPLogin, FTPPasword); Connection.Connect(); Which results in JSchException: System.Net.Sockets.SocketException: The requested name is valid, but no data of…
Piotroslav
  • 252
  • 1
  • 4
  • 14
6
votes
1 answer

What are the key file formats of JSch and sharpSSH?

I'm looking at setting up public key client and server authentication for SFTP using the JSch library (or actually the sharpSSH C# port of it). Unfortunately I cannot find any documentation for the file formats used by the key loading…
Patrick
  • 8,175
  • 7
  • 56
  • 72
6
votes
1 answer

Streaming a file from SharpSSH

I'm trying to use SharpSSH to get a file from a remote SFTP server, and I want to read it out as a stream. I found: class Sftp, which has a Get method that saves it to a local file -- close class SshStream, which might do kind of what I want, but…
Ken
  • 123
  • 1
  • 9
5
votes
1 answer

Sharpssh directory listing

I'm writing an application that allows me to up- and download files from a remote server. I'm using sftp as my transfer protocol and i need to list all files and directory's into a listview. I'm using sharpssh for sftp. Can somebody point me into…
Bash
  • 53
  • 1
  • 1
  • 4
5
votes
3 answers

SharpSSH jsch Algorithm negotiation fail

I use SharpSSH .NET library for SFTP. http://www.tamirgal.com/blog/page/sharpssh.aspx When I try to connect the server I get an error Algorithm negotiation fail But when try to connect by FileZilla it works with no problems. I find some with the…
24sharon
  • 1,859
  • 7
  • 40
  • 65
5
votes
3 answers

Tamir.SharpSsh Could not load file or assembly 'DiffieHellman

private void OVConnection() { try { //Create a new JSch instance JSch jsch = new JSch(); this.Dispatcher.BeginInvoke(new Action(DisplayStatus), Status.Connecting); //Create a new SSH session …
LeBlues
  • 305
  • 2
  • 5
  • 20
5
votes
2 answers

SSH / SFTP connection issue using Tamir.SharpSsh

This is my code to connect and send a file to a remote SFTP server. public static void SendDocument(string fileName, string host, string remoteFile, string user, string password) { Scp scp = new Scp(); …
jinsungy
  • 10,717
  • 24
  • 71
  • 79
5
votes
1 answer

System IOException Stream Read End with Sharp SSH

I'm currently facing a really strange problem in one of my projects. I've implemented Tamir Gal's Sharp SSH Library in my code to upload some files per FTP. When I run the code in Debug Mode everything works just as it should. But when I build the…
platzhersh
  • 1,520
  • 20
  • 35
4
votes
1 answer

SharpSSH's Scp object can't copy files bigger than 2GB

Whenever I try to copy a file that's bigger than 2GB, I get an array index out of bounds exception in the Get method: Scp myScp = new Scp("remotehost", "joe", "mypassword"); myScp.OnTransferProgress += new…
JCCyC
  • 16,140
  • 11
  • 48
  • 75
4
votes
1 answer

Auth fail error when using SharpSSH

I am trying to connect to a Solaris/Unix server using a C# class to read system information/configuration, memory usage etc. My requirement is to run the commands on the server from a C# application (as we do with a PuTTY client) and store the…
BlackCursor
  • 1,492
  • 1
  • 17
  • 29
4
votes
3 answers

Check if file exist on SFTP remote server

The following code will down the file named file.txt from the SFTP remote server to the local machine. sftp.Get("/usr/mine/file.txt" , "C:/Folder/"); What i want to do is to Check if the file file.txt exist in the remote server or not. How can i…
Illep
  • 16,375
  • 46
  • 171
  • 302
1
2 3 4 5 6 7