New Post: Server string is null or empty
can you help me understand why Session.cs is throwing an InvalidOperationException of "Server string is null or empty." when it is attempting to read the response(s) coming back from the connection...
View ArticleNew Post: Issue with SFTPFile methods
Hi All I'm getting a Object reference not set to an instance of an object error when attempting to use any of the methods of SFTPFile (MoveTo, Delete, UpdateStatus) on multiple sftp sites. I can...
View ArticleNew Post: Issue with SFTPFile methods
I'm not sure where but the problem appears to be in my code somewhere i think. I managed to get the rename to work by using sftpClient.rename rather than File.MoveTo. Literally just commented out...
View ArticleNew Post: Permission denied (publickey)
Hi, I am using private key to connect to Unix host. PrivateKeyFile SSHKey = new PrivateKeyFile( @"C:\x_dsa.txt" ); string userName = "user1"; PrivateKeyConnectionInfo conInfo = new...
View ArticleNew Post: Dealing with "prompts"
Ive managed to get connected and ive manged to send commands and recieve responses so its working great so far. But whenever I execute a command that has a prompt on the next line my code simply just...
View ArticleCommented Feature: Add support SSH-2 private keys [1987]
I need to connect using sftp utilizing private key.The key file is created using SSH-2 client.I get "Invalid private key file." error message.I just want to confirm if SSH-2 keys are supported!!if not,...
View ArticleNew Post: [SOLVED] Retrieving a LOT of output from a command...
I have figured out recently on the Cisco switches on the network I work on the "term pager 0" doesn't work.Dim result1 As String = DoCommand(client, "enable" & vbLf & "enablePass" & vbLf...
View ArticleCommented Unassigned: SftpClient is throwing undocumented exceptions [2148]
The documentation says that Connect can throw InvalidOperationException and ObjectDisposedException, but when you can't connect (remote server stopped, network problem, ...) a SocketException is thrown...
View ArticleCreated Unassigned: Unable to execute the commands with "sudo" on...
Hi,I was trying to access and execute the commands on remote Linux machine of CentOs-OpenLogic. But while executing the commands with sudo option, i was getting error like tty required. My code is as...
View ArticleCreated Unassigned: NullReferenceException on opening and listen to a...
Hello,i am having the following issue on the newest beta version of Renci.SSHNet 2014.4.6.0If I try to open a ShellStream on a previously opened SSH Session to an embedded Linux system I am getting the...
View ArticleNew Post: ShellStream, end of command / waiting for input
@washirv, The short answer is "Yes." You can look for a prompt, and/or apply a timeout. You can even extend and write your own, which others have done. Many have posted working examples in these...
View ArticleNew Post: Dealing with "prompts"
@Jelly, There are many examples from the users here in the discussions to do all kinds of things. There is certainly an example in the discussions, docs, or tests/source to do with what you are trying...
View ArticleNew Post: [SOLVED] Retrieving a LOT of output from a command...
@chipgraphics, What a nice note! Thanks! It was a stupid change for cisco, and makes no sense whatsoever... it's the same IOS, for cryin' out loud...
View ArticleNew Post: Server String is null or empty
I have an SSIS (SQL Server Integration Services) package that is c# based. I am trying to connect to a MySQL server using the SSH Renci library. Here is what I am trying: using Renci.SshNet.Common;...
View ArticleCreated Unassigned: SshCommand doesn't cleanup subscribed events [2295]
The SshCommand class leaves the unerlying channel subscribed to the session events after running a command.Repro is:```using (var client = new SshClient(connectionInfo)){ client.Connect(); for (var i =...
View ArticleCommented Unassigned: SftpClient is throwing undocumented exceptions [2148]
The documentation says that Connect can throw InvalidOperationException and ObjectDisposedException, but when you can't connect (remote server stopped, network problem, ...) a SocketException is thrown...
View ArticleCommented Unassigned: NullReferenceException on opening and listen to a...
Hello,i am having the following issue on the newest beta version of Renci.SSHNet 2014.4.6.0If I try to open a ShellStream on a previously opened SSH Session to an embedded Linux system I am getting the...
View ArticleNew Post: Dealing with "prompts"
Hello Pat, Thanks for taking the time to look into my problem. I agree theres lots of good information on here and i'm getting little bits from here and there, but im at a stage now where I think I...
View ArticleNew Post: How to get command result which contains multiple lines...
You could use an array.. String[] myArray = cmd1.Result.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); This will split the array based on carriage returns and new lines etc
View ArticleNew Post: Dealing with "prompts"
@Festive, I no longer do things this way, because on the systems I am programming against today (Cisco switches, routers, & ASAs), the command prompt is the last thing output after a command. You...
View Article