Topic "HostKey for SFTP"

Author Message
pranavcool
[View user's profile]

Joined: 2011-05-02
Posts: 2
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
winscp.StandardInput.WriteLine("open sftp://xyz:abc@servername -hostkey=\"xyz\"");
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License