SCP/SFTP Operations Timeout
I have a bit of a weird issue. I can set up new SSH sessions fine but trying SCP or SFTP fails with operation timeout. I upgraded my cmdlets to the newest version and same issue.
PS C:\> Set-SCPItem -ComputerName $computer -Credential $cred -Path $fileName -Destination /tmp -AcceptKey:$true -Verbose
VERBOSE: Using SSH Username and Password authentication for connection.
VERBOSE: ssh-ed25519 Fingerprint for server1: xx.xx.xx.xx.xx
VERBOSE: Fingerprint matched trusted ssh-ed25519 fingerprint for host server1
Set-SCPItem : Session operation has timed out
At line:1 char:1
Set-SCPItem -ComputerName $computer -Credential $cred -Path $fileName ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationTimeout: (Renci.SshNet.ScpClient:ScpClient) [Set-SCPItem], SshOperationTimeoutException
+ FullyQualifiedErrorId : SSH.SetScpItem
I've tried extending the timeout to no avail and tried various servers. I verified the remote hosts were operational for SCP/SFTP with WinSCP which works fine.
And like I said... it's weird because I can throw a new SSH session up and that piece works, just not the scp/sftp portions. SCP fails as above as does trying to create a new SFTP session. I turned on verbose but not really giving me anything useful. I also cleared out the keys for those hosts to see if that helped but no dice.
nvm - figured it out
I did notice that if you feed the wrong username it does not seem to throw an error, just operation timeout which seems odd.