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
3
votes
1 answer

How could I use rmdir in SFTP to remove remote folders not empty?

Recently, I'm using SharpSSH to deal with remote files. The SharpSSH offers API of rmdir for removing remote directories, but I find that it throws exceptions with message "Permission denied" when the directory is not empty. Then I've got to delete…
Mercraft
  • 33
  • 1
  • 6
3
votes
2 answers

Download file based on date modified from SFTP

Is there a way to get the files from SFTP server that should be based on modified date using Tamir.SharpSsh? Currently I am downloading files by file name but my requirement is by Date Modified. var sftp = new Sftp(Host, UserName,…
Sudha
  • 505
  • 1
  • 10
  • 27
3
votes
2 answers

SharpSSH gets stuck in an infinite stream read in C# SSH app

Afternoon all, I'm having a small problem with the SharpSSH library for .Net (see http://www.tamirgal.com/blog/page/SharpSSH.aspx) SshStream ssh = new SshStream("some ip address", "some username", "some password"); ssh.Prompt =…
Ric
  • 683
  • 2
  • 11
  • 19
3
votes
2 answers

How to upload a file to SFTP server using SharpSSH

I want to use SharpSSH to upload a file to a SFTP server. I got SharpSSH.dll, the file to upload, a public key and I sent the private key to the server. They gave me a username and no password is needed. I tried this: Sftp sftp = new Sftp(ip,…
abc
  • 2,285
  • 5
  • 29
  • 64
3
votes
0 answers

C# - SharpSSH transfer in ASCII mode?

I'm using SharpSSH to transfer xml files to a unix machine. Here is the code that writes the files: public override void WriteFile(string directoryName, string fileName, string responseText) { try { sshExec.RunCommand(@"echo """ +…
Yoav
  • 2,077
  • 6
  • 27
  • 48
3
votes
1 answer

Remotely delete a file through SFTP using a C# program

I want to ask how can I remotely delete a file using sftp I have tried using SharpSSH but it doesn't work, I got SftpException i added this code first in the sftp.cs first public void Delete(string path) { SftpChannel.rm(path); …
User2012384
  • 4,769
  • 16
  • 70
  • 106
2
votes
1 answer

how to use SharpSSH for Executing linux commands which prompts for additonal input?

Ok heres what I'm trying to do I have to setup an SSH session to a linux machine and issue a command like "ls" or cp. heres the snippet SshStream ssh = new SshStream ("myhost","root","pass"); ssh.Prompt ="#"; …
Vivek Bernard
  • 2,063
  • 3
  • 26
  • 43
2
votes
1 answer

SharpSSH .NET Library: unable to connect to Linux (Debian) from .NET

I'm trying to connect to Linux using SharpSSH, but am unable to. I want to run some Linux commands from my .NET application. Install Instructions: SharpSsh - .NET library to connect to UNIX via SSH - create account @ codeproject.com -…
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
2
votes
2 answers

How to use SharpSSH SFTP library for .NET with a proxy?

i am using SharpSSH library to upload files to a SFTP server. I can do it fine through my home PC, but from my work's PC, I can not access the server. After contacting the sysadmins (located in another country), they told me I need to access the…
Panos Antoniou
  • 73
  • 1
  • 12
2
votes
1 answer

How to append a text file on SFTP server using SharpSSH or SSH.NET library

I use Tamir.SharpSSH library to make my SFTP operations. I can upload file from client, delete or list files located in an SFTP server directory. But I cannot find how to append a text file. I don't want to overwrite or delete the existing and…
Orkun Bekar
  • 1,447
  • 1
  • 15
  • 36
2
votes
1 answer

Read file from SFTP as array of byte without downloading it to a file C#

I am using SharpSSH to access SFTP. I don't want to download the remote file, I just want to read its data as a string or array of byte. In SharpSSH, I just found function to download the file from source folder to another folder. Is there any way…
user1947393
  • 153
  • 4
  • 18
2
votes
2 answers

VT100 Emulation LIbrary in C# with SharpSSH

I'm messing around with Tamir.SharpSsh and wanted to see if it was possible to use it to implement a console SSH client fully in C#. I do not mean something like putty where it's actually running in it's own GUI, but something you could run…
Adam Haile
  • 30,705
  • 58
  • 191
  • 286
2
votes
1 answer

Get file size from SFTP using SharpSSH

I'm uploading a zip file from local directory to SFTP using SharpSSH. Everything works fine. However, I would like to get the file size of the current file I just uploaded. The reason I'm doing this is that the zip file is big (from 45 GB to 80 GB)…
smr5
  • 2,593
  • 6
  • 39
  • 66
2
votes
1 answer

SSH through another SSH-connection

So I'm trying to figure out a way to execute commands and read data from a pretty standard SSH-connection, using C#. The only challenge is that I can't connect to the server in question directly, I have to go through another SSH-connection, like a…
2
votes
0 answers

Tamir SharpSSh get method getting wrong modification date as compared to sftp server

I am using SharpSSH.SFTP(TAmir) library to get the file using Get() method from a ftp server using sftp protocol. I am able to successfully fetch the file from the server but its having the timestamp of when the file was fetched,not the original…