"New-SFTPSession : The server response does not contain an SSH identification string."
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
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?
I believe the host I'm connecting to is using Jscape.