Topic "HostKey for SFTP"

Author Message
[View user's profile]

Joined: 2011-05-02
Posts: 2

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.

Pranav Dave.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26299
Location: Prague, Czechia
winscp.StandardInput.WriteLine("open sftp://xyz:abc@servername -hostkey=\"xyz\"");
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License