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

"New-SFTPSession : The server response does not contain an SSH identification string."

Open r-philp opened this issue 2 years ago • 2 comments

In code that has been working perfectly for a while, New-SFTPSession has begun returning "New-SFTPSession : The server response does not contain an SSH identification string." I know that the target server has changed their certificate, but -AcceptKey ought to permit that. I can successfully connect using FileZilla and the SFTP protocol. What might be going on?

#setup $PWord = ConvertTo-SecureString -String $password -AsPlainText -Force #turn the password into a secure string $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord #use userid and secure string password to create credentials $session =New-SFTPSession -AcceptKey -ComputerName $secureserver -Port $secureport -Credential $Credential #connect to FTP server

r-philp avatar Mar 12 '23 16:03 r-philp

Identification string is different from the host key. It is part of the RFC but some vendors do not adhere to it in negotiation of the connection. Sadly itnis an issue with the library used that does not support yet lazy identification for non OpenSSH servers and a large amount of Cisco kit. What SSH SFTP server are you connecting to?

darkoperator avatar Mar 12 '23 20:03 darkoperator

I believe the host I'm connecting to is using Jscape.

r-philp avatar Mar 13 '23 13:03 r-philp