Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: A Little Help With Connection Settings

$
0
0

Just found your project.  Looks pretty good.  Having a small issue getting going.

Used the example code as a base such that I have this:

using (var client = new SshClient("<host>", "<user>", "<pass>")) {try {
      client.Connect();var cmd = client.CreateCommand("ll ~");
      cmd.Execute();
      client.Disconnect();
   }catch( Exception ex ) {
System.Diagnostics.Debug.WriteLine(ex.StackTrace); 
   }finally {if( client.IsConnected ) { client.Disconnect(); }
   }
}

Running this code yeilds: "bash: ll: command not found"

If I change the command from "ll ~" to "ls ~", lo and behold it works.

It appears that the connection isn't seen by the server as an interactive terminal session so that all the various bash profile pieces aren't being executed.

 

Am I missing something about how to configure SSH.NET so the server sees this as just another ssh session?

Thanks,

Michael


Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>