hostkey syntax

Advertisement

palo
Guest

hostkey syntax

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

Reply with quote

Advertisement

palo
Guest

Re: hostkey syntax

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:

Reply with quote

Advertisement

You can post new topics in this forum