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

New Post: Dealing with "prompts"

$
0
0
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 hangs...

Heres my code:
            PasswordAuthenticationMethod authMethod = new PasswordAuthenticationMethod(username, password);
            ConnectionInfo connectionInfo = new ConnectionInfo(session, username, authMethod);
            vms = new SshClient(connectionInfo);
            vms.Connect();

            SshCommand result = vms.RunCommand(command);
            Console.WriteLine(result.Result);
Any ideas? Its working quite well other than just hanging.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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