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

New Post: How to handle unexpected authentication requests properly.

$
0
0
K, then you have to do it on your own by parsing the Output and ask the user if a password is necessary.
SSH.Net can't help you here, since it is not part of SSH protocol.

Sounds like you can't use expect() since those password-prompts appear unexpected.
So you have to do it async and parse the shell output if it contains a password request.
But it isn't that hard.

The tests are a great source for examples, e.g:
https://sshnet.codeplex.com/SourceControl/latest#Renci.SshClient/Renci.SshNet.Tests/Classes/SshCommandTest.cs

Test_Execute_Command_Asynchronously() and further.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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