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

New Post: Trouble with Space in SSH-Command

$
0
0
Hi,

i have a problem with remote-excution of commands when they include a space.
There is a working connection to a firewall (http://www.securepoint.cc/products-utm-firewalls.html) and i can use single-term commands (i.e. "help"), but not "appmgmt status". It seems to me, that the firewall interprets the command as two commands - it returns alway "--unknown command". With Putty it works like a charm.

I wrote a simple test-application to clarify the issue:
ConnectionInfo sLogin = new PasswordConnectionInfo(_host, _user, _password);
            SshClient sClient = new SshClient(sLogin);
            sClient.Connect();

            SshCommand appStatCmd = sClient.CreateCommand("help");
            appStatCmd.Execute();
            textBox1.Text = appStatCmd.Result;
            
            sClient.Disconnect();
            sClient.Dispose();     
I also tried to change the encoding of the command, without luck.

Target-Framework is 4.0, working on a Windows 2008 SP2 x64 RDS with Visual Studio 2010 Pro.

Any help will be appreciated.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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