how can i get the SShKey from server ?

Advertisement

deconett
Joined:
Posts:
3

how can i get the SShKey from server ?

halo,
i have a big problem :),namely, I write a C # program that scans a network and connect using WinSCP to several servers.to connect to this server, I need a SSHkey!!!

how can i get this SShKey from server ?
can i connect to the Server without SSH key?

Many thanks for your help

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: how can i get the SShKey from server ?

deconett wrote:

how can i get this SShKey from server ?
You should know it before connecting. Should be part of the info you get from the server admin, along with your credentials.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: how can i get the SShKey from server ?

deconett wrote:

there exists a function with which I can get this infos from the server ? like winSCP does that.
No. That would spoil the purpose of key verification.

when are the update with the event to implement custom way of verifying the host key coming? :)
I cannot give any date yet.

Reply with quote

Perhogan
Donor
Joined:
Posts:
10
Location:
Germany

I had the same problem today and I solved this way:

Assuming that i trust that the server that is at the address is reliable (it is an internal server in the network)
1) I purged the data saved in WinSCP from previous connections so it erases the saved key (under tools).
2) i reconnected to the sftp server, biung the 1st time WinSCP shows me the key and ask if I accept it anyway
3) At this point you see a message with the Key and there is a button to copy it :-)

problem solved :-)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Perhogan wrote:

Assuming that i trust that the server that is at the address is reliable (it is an internal server in the network)
1) I purged the data saved in WinSCP from previous connections so it erases the saved key (under tools).
2) i reconnected to the sftp server, biung the 1st time WinSCP shows me the key and ask if I accept it anyway
3) At this point you see a message with the Key and there is a button to copy it :-)
You can also get the key on Server and Protocol Information Dialog:
https://winscp.net/eng/docs/ui_fsinfo

Reply with quote

Advertisement

You can post new topics in this forum