sharpssh

Can't get SharpSSH to connect via FTP

I'm having trouble making a secure FTP connection using SharpSSH. Up to now I've been using the DOS command line app MOVEit Freely to make the connection, and it connects fine: C:\> ftps -user:ABC -password:123 xxx.xxx.xxx.mil However, when I try to do the same thing with SharpSSH, I get an error that says either the connection timed ...

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(); scp.OnConnecting += new FileTansferEvent(scp_OnConnecting); scp.OnStart += new ...

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 = "\n"; ssh.RemoveTerminalEmulationCharacters = true; ssh.Write("s...

How to get a Stream object for a remote file on SFTP using SharpSSH library?

How can I get a Stream object to read the file that is on SFTP share? I see that there is functionality to download a file from SFTP using Sftp class, but I need a Stream object to be able to show the download progress. ...

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

Anyone knows how to delete a file from a SFTP server using Tamir Gal's SharpSSH? I have been able to accomplish other functionality but deletion. Thanks in advance. ...

Running a command that produces no output with SharpSSH

I want to run a command using ssh. I am using the SharpSSH library, as in this example: using System; using Tamir.SharpSsh; class Program { static void Main(string[] args) { string hostName = "host.foo.com"; string userName = "user"; string privateKeyFile = @"C:\privatekey.private"; string privateKey...

SharpSSh: RunCommand in SshExec is always returning an empty string

Hey! When Using SharpSSh and the SshExec class, I can't get the RunCommand to work, it always returns an empty string. When I debug the SharpSsh library it returns -1 when it tries to read the command from a stream. It works when I use the sftp class in the same library, but that class doesn't support all the ftp commands I need. Here ...

[c#] Sharpssh directory listing

Hey, 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 the right direction? Thanks in forward, Bas van Ooyen ...

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 directly from the windows cmd console. The library is pretty great, except that it doesn't handl...

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 wrangle streams the whole time and it seems that it would be a bit of a kludge. So I've tried ...

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 seems disjoint from Sftp so I might have to implement the SFTP part myself (??) class Cha...

SharpSSH Progress and Rename

VB2005 and SharpSSH. Using the library to connect to a remote server and copy a file. I have the process working fairly well but have some smaller things which I cant seem to resolve as documentation for the library is fairly thin. I have two routines working. One using the Tamir.SharpSsh class and the other using the Tamir.SharpSsh.jsc...

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 FileTransferEvent(scpProg); myScp.Connect(22); myScp.Get("/home/joe/bigfile.bin", "/tmp/bigfile.bin"); myScp.Close(); ...

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 in code. This script also runs against Linux machines via SSH using the SharpSSH package. ...

SharpSSH - SSHExec, run command, and wait 5 seconds for data!

I have this code: using System; using System.Text; using Tamir.SharpSsh; using System.IO; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { SshExec exec = new SshExec("192.168.0.1", "admin", "haha"); exec.Connect(); string output = exec.RunComma...

Tamir SSH - read gets struck indefinately

Hello, I am using tamir ssh for running commands remotely, as it is not possible to know command prompts for all the machine i decided to use this code while (myFlag) { **input = ssh.IO.ReadByte();** if(input==-1) { myFlag=false; } else { append in string builder } } I never get -1, the cod...

SharpSSH JSCH exec command & symbolic link

Using the Tamir.SharpSsh.jsch I am trying to run a custom command in VB2005. so i opened an "Exec" channel and setup the command "dumper df_500.bin". it returns a response that dumper does not exist. so I tried doing the exact same command in a command window in Tunnelier and it works in that environment. the only thing special about thi...