What is host key and how can i get that

Advertisement

ykmohank
Joined:
Posts:
6

What is host key and how can i get that

Hi,

I have to automate a task of sftp few files using winscp.
While looking at the command syntax it was mentioned that i need to have host key to achieve this.
Can someone please help me on how can i get this one.

Reply with quote

Advertisement

geraldb
Joined:
Posts:
3
Location:
near Mainz

Try to connect server using WinSCP.exe as graphical interface with SFTP-protocol and port 22. You don't have to use correct login data and after this scan generated log file. This contains a line like
Host key fingerprint is:
and the following line contains host key, e.g.
ssh-dss 1024 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef
The host key are 16 blocks separated by : in example before
12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef

Reply with quote

ykmohank
Joined:
Posts:
6

Hi,
Thanks for you reply,But can you please guide me about the location where i can see the generated log file.
And once i got the host key what i need to do to automate my task of sending files to the targeted server.

Please help me i am very new to WinSCP and SFTP.

Reply with quote

Advertisement

Blade62
Joined:
Posts:
1
Location:
Philippines

Re: What is host key and how can i get that

Is WinSCP capable of storing multiple host key?

The Admin provided new host key but it will be activated after a week and we still need to use the old host key. How can I upload the new key while still using the old host key?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
36,066
Location:
Prague, Czechia

Re: What is host key and how can i get that

In GUI? Or in scripting?

In the GUI, you just check and accept the new key, whenever the change happens. You can also add an additional key upfront to registry, but there's no user friendly way to do that, if the key is not active yet.

In the scripting, you can use a list of semicolon separated host key fingerprints:
https://winscp.net/eng/docs/scriptcommand_open#hostkey

Reply with quote

Advertisement

You can post new topics in this forum