Is it really necessary to provide code? The problem seems pretty clear to me: If you run a command that itself will generate a password request, how would one handle that?
For instance, you use SshStream to log into a host, then try to ssh into another host from there.
For instance, you use SshStream to log into a host, then try to ssh into another host from there.