Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: HostKey for SFTP

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

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.