janhoedt
asked on
PS, Winscp: "New-WinSCPSession : Exception calling "Open" with "1" argument(s): "SessionOptions.Protocol is Protocol.Sftp or Protocol.Scp, but SessionOptions.SshHostKeyFingerprint is not set."
Hi,
I'd like to use winscp but do not have a fingerprint. Yes, I know that's a security risk but not where I use it.
This is the tool https://gallery.technet.microsoft.com/WinSCP-PowerShell-Module-ee1601ff
How can I find a way around it?
J.
I'd like to use winscp but do not have a fingerprint. Yes, I know that's a security risk but not where I use it.
This is the tool https://gallery.technet.microsoft.com/WinSCP-PowerShell-Module-ee1601ff
How can I find a way around it?
J.
ASKER
Not sure, the default one, guess that's scp.
There is no error, it just asks for a fingerprint which I do not have.
There is no error, it just asks for a fingerprint which I do not have.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is wnscp ftp? (!)
To quote the WinSCP website:
So yes, WinSCP can be used with several file transfer protocols, FTP being one of them.
Dan
WinSCP is a popular SFTP client and FTP client for Microsoft Windows!
Copy file between a local computer and remote servers using
FTP, FTPS, SCP, SFTP, WebDAV or S3 file transfer protocols.
So yes, WinSCP can be used with several file transfer protocols, FTP being one of them.
Dan
ASKER
Apparently we use sftp, what is not working with the commands here.
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::sFtp
HostName = $ftpServer
PortNumber = 22
UserName = $userName
Password = $passWord
}
Error is:
SessionOptions.Protocol is Protocol.Sftp or Protocol.Scp, but SessionOptions.SshHostKeyF ingerprint is not set. (raised by: New-WinSCPSession)
New-WinSCPSession -SessionOption $sessionOptions
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::sFtp
HostName = $ftpServer
PortNumber = 22
UserName = $userName
Password = $passWord
}
Error is:
SessionOptions.Protocol is Protocol.Sftp or Protocol.Scp, but SessionOptions.SshHostKeyF
New-WinSCPSession -SessionOption $sessionOptions
Can you post the script throwing the error?
Dan