Topic "hostkey syntax"

Author Message
palo

Guest


Hello

I am trying to use winscp.com with commandline arguments to upload file to server, and want to do automatic accept of host key of particular server. What is the correct syntax of -hostkey? None of following is working on winscp 5.1.7

C:\bin\WinSCP>winscp.com /command "open sftp://root@10.40.0.88" "-hostkey=ssh-rs
a 1024 c2:1a:ae:97:41:ee:19:83:c5:90:93:ef:7b:b3:ed:1f"
Searching for host...
Connecting to host...
Authenticating...
The server's host key was not found in the cache. You have no guarantee that the
server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 c2:1a:ae:97:41:ee:19:83:c5:90:93:ef:7b:b3:ed:1f
If you trust this host, press Yes. To connect without adding host key to the cac
he, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache?
(Y)es, (N)o, C(a)ncel, (C)opy Key:

C:\bin\WinSCP>winscp.com /command "open sftp://root@10.40.0.88" "-hostkey=c2:1a:
ae:97:41:ee:19:83:c5:90:93:ef:7b:b3:ed:1f"
Searching for host...
Connecting to host...
Authenticating...
The server's host key was not found in the cache. You have no guarantee that the
server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 c2:1a:ae:97:41:ee:19:83:c5:90:93:ef:7b:b3:ed:1f
If you trust this host, press Yes. To connect without adding host key to the cac
he, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache?
(Y)es, (N)o, C(a)ncel, (C)opy Key:

C:\bin\WinSCP>winscp.com /command "open sftp://root@10.40.0.88 -hostkey=ssh-rsa
1024 c2:1a:ae:97:41:ee:19:83:c5:90:93:ef:7b:b3:ed:1f"
Too many parameters for command 'open'.
winscp>


Pavol Gono
palo

Guest


found answer:

C:\bin\WinSCP>winscp.com /command "open sftp://root@10.40.0.88 -hostkey=""ssh-rs
a 1024 c2:1a:ae:97:41:ee:19:83:c5:90:93:ef:7b:b3:ed:1f"""
Searching for host...
Connecting to host...
Authenticating...
Using username "root".
Using keyboard-interactive authentication.
Password:
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