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

New-SSHSession Timeouts

Open jdixon12 opened this issue 4 years ago • 4 comments

I'm not sure if new MS patches broke it but any New-SFTPSession, New-SSHSession, etc all times out.

"Session operation has timed out"

I can SSH/SCP/SFTP to the hosts just fine, it's just Posh-SSH that is failing suddenly which is odd given I've used it for years. I was still using 2.02 and upgraded to 2.2 in hopes maybe that was the issue, no dice.

Any ideas? Verbose isn't giving any clues. I see it gets the key fine. Hosts are local so no crazy latency or anything like that.

PS C:\> New-SSHSession -ComputerName omah-srv-ovc-01 -Credential $cred -AcceptKey:$true -Verbose
VERBOSE: Using SSH Username and Password authentication for connection.
VERBOSE: Fingerprint for omah-srv-ovc-01: 70:11:45:eb:5:9e:5e:2f:95:84:4f:83:d9:94:71:c3
VERBOSE: Fingerprint matched trusted fingerprint for host omah-srv-ovc-01

New-SSHSession : Session operation has timed out
At line:1 char:1
+ New-SSHSession -ComputerName omah-srv-ovc-01 -Credential $cred -Accep ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationTimeout: (Renci.SshNet.SshClient:SshClient) [New-SSHSession], SshOperationTimeoutException
    + FullyQualifiedErrorId : SSH.NewSshSession

Current Version: Posh-SSH 2.2

jdixon12 avatar Jun 01 '21 13:06 jdixon12

So it was working before windows update and now it does not? Where the updates on the client or the server? Can you try the beta of 3.0 since it will replace the 2.x branch

darkoperator avatar Jun 01 '21 14:06 darkoperator

Windows 10 1909 and it just got the May updates about a week ago. I can grab the beta 3.0 and give that a whirl.

jdixon12 avatar Jun 01 '21 14:06 jdixon12

Looks like 3.0 fixed it. I was hesitant to grab it since it was beta but seems way to go.

One other note, I noticed this worked fine for ESX hosts but not Ubuntu hosts so maybe something there. Either way, we're good now and I'm re-writing my script since Set-SCPFile is not Set-SCPItem... :)

Thanks!

jdixon12 avatar Jun 01 '21 14:06 jdixon12

Could be the host keys are under the new format an RSA

Sent from my iPhone

On Jun 1, 2021, at 10:34 AM, jdixon12 @.***> wrote:

 Looks like 3.0 fixed it. I was hesitant to grab it since it was beta but seems way to go.

One other note, I noticed this worked fine for ESX hosts but not Ubuntu hosts so maybe something there. Either way, we're good now and I'm re-writing my script since Set-SCPFile is not Set-SCPItem... :)

Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

darkoperator avatar Jun 01 '21 15:06 darkoperator