HostKey for SFTP

Advertisement

pranavcool
Joined:
Posts:
2

HostKey for SFTP

Hi,

Currently i am using winscp tool in my C# code.

i am using sftp to upload the file to sftp folder.

now i want to write c# code to accept the hostkey for my sftp server.

winscp.StandardInput.WriteLine("open sftp://xyz:abc@servername");
winscp.StandardInput.WriteLine("-hostkey xyz");

but it is throwing an error as unknown command.

can any one tell me the the right syntax to write in c# code to accept the hostkey.

Regards,
Pranav Dave.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum