Topic "how can i get the SShKey from server ?"

Author Message
deconett
[View user's profile]

Joined: 2012-03-20
Posts: 3
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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
_________________
Martin Prikryl
deconett
[View user's profile]

Joined: 2012-03-20
Posts: 3
there exists a function with which I can get this infos from the server ? like winSCP does that.

when are the update with the event to implement custom way of verifying the host key coming? Smile

https://winscp.net/tracker/show_bug.cgi?id=815
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.

Quote:
when are the update with the event to implement custom way of verifying the host key coming? Smile

I cannot give any date yet.
_________________
Martin Prikryl
Perhogan
[View user's profile]
Donor
Joined: 2012-05-16
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 Smile

problem solved Smile
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
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 Smile

You can also get the key on Server and Protocol Information Dialog:
https://winscp.net/eng/docs/ui_fsinfo
Perhogan
[View user's profile]
Donor
Joined: 2012-05-16
Posts: 10
Location: Germany
By the way.
Really good software and site.
Amazing you do all by yourself

thank you
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I have added topic to the FAQ:
https://winscp.net/eng/docs/faq_hostkey
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