Unable to connect - Host key not verified/Authentication Failed
Posted: Wed 16 Dec 2020 13:25
Hello everyone,
I have inherited a Delphi project that connected to a webserver via SSH for MySQL access. I now have to move webservers - unfortunately the person who set up the original webserver & wrote the program is not available and I am new to SecureBridge (and not that familiar with SSH either)
My problem is that I cannot get SSH Client access working against the new server - I keep getting "host key not verified". Then when I try the code provided in the STFPClient demo, I get "Authentication Failed: publickey"
(My bigger problem is that the original server gets turned off in Jan 2021 and I am powerless to prevent it)
Here's what I've done.
- I generated a new Key using PuttyGen. (RSA 2048)
- Exported the public key & private key
- Added the public key to my web server through Plesk (see screen shot)
- Imported the key to the TscFileStorage component - and the two fingerprints match.
When I run the program it drops into the "OnServerKeyValidate" method - which runs the sample code I added from the SFTPClient demo, and I find a "emsb2.key" file in my program folder. The next run picks up that file & I get the same "Authentication Failed Publickey"
Interestingly the Fingerprint of the received key does not match any on the server (not sure if this is significant).
I also note that I get an "emsb2.key" file generated in a sub folder that is literally "\$(Platform)\$(Config)\" so I moved that over to the Win32\Debug\ folder -- yet when I do that I get "Host key not verified"
Here's my connect code: https://pastebin.com/JCr1Vryn
Hoping someone can tell me what I'm doing wrong.
I can provide a sample project.
Thanks in advance.
*Edit: I can login via PuTTY on Windows using the Puttygen PPK file*
I have inherited a Delphi project that connected to a webserver via SSH for MySQL access. I now have to move webservers - unfortunately the person who set up the original webserver & wrote the program is not available and I am new to SecureBridge (and not that familiar with SSH either)
My problem is that I cannot get SSH Client access working against the new server - I keep getting "host key not verified". Then when I try the code provided in the STFPClient demo, I get "Authentication Failed: publickey"
(My bigger problem is that the original server gets turned off in Jan 2021 and I am powerless to prevent it)
Here's what I've done.
- I generated a new Key using PuttyGen. (RSA 2048)
- Exported the public key & private key
- Added the public key to my web server through Plesk (see screen shot)
- Imported the key to the TscFileStorage component - and the two fingerprints match.
When I run the program it drops into the "OnServerKeyValidate" method - which runs the sample code I added from the SFTPClient demo, and I find a "emsb2.key" file in my program folder. The next run picks up that file & I get the same "Authentication Failed Publickey"
Interestingly the Fingerprint of the received key does not match any on the server (not sure if this is significant).
I also note that I get an "emsb2.key" file generated in a sub folder that is literally "\$(Platform)\$(Config)\" so I moved that over to the Win32\Debug\ folder -- yet when I do that I get "Host key not verified"
Here's my connect code: https://pastebin.com/JCr1Vryn
Hoping someone can tell me what I'm doing wrong.
I can provide a sample project.
Thanks in advance.
*Edit: I can login via PuTTY on Windows using the Puttygen PPK file*