Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

ExpectAction but for New-SSHSession ?

Open aaearon opened this issue 4 years ago • 1 comments

I am trying to create a ssh session where as part of the login process I first provide a PIN and then afterwards a one time password. I pack my username and PIN in the PSCredential object but the problem comes about when I am prompted separately for the one time password. Furthermore, after successfully authenticating, I must provide a reason and here is another instance where ExpectAction would be needed.

Is there something like Invoke-SSHStreamExpectAction but for when creating SSHSession? I cannot use Invoke-SSHStreamExpectAction because I cannot create a SSH session to create a stream from.

aaearon avatar Sep 09 '21 11:09 aaearon

Sadly this is not supported by the library Im using

Sent from my iPhone

On Sep 9, 2021, at 7:46 AM, Tim Schindler @.***> wrote:

 I am trying to create a ssh session where as part of the login process I first provide a PIN and then afterwards a one time password. I pack my username and PIN in the PSCredential object but the problem comes about when I am prompted separately for the one time password. Furthermore, after successfully authenticating, I must provide a reason and here is another instance where ExpectAction would be needed.

Is there something like Invoke-SSHStreamExpectAction but for when creating SSHSession? I cannot use Invoke-SSHStreamExpectAction because I cannot create a SSH session to create a stream from.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

darkoperator avatar Sep 09 '21 12:09 darkoperator