Search found 7 matches

by stuartclennett
Mon 21 Dec 2020 12:25
Forum: SecureBridge
Topic: Unable to connect - Host key not verified/Authentication Failed
Replies: 8
Views: 14008

Re: Unable to connect - Host key not verified/Authentication Failed

Dear Viktor,

Thanks for your explanation - it was very helpful.

I imported the key using the .ppk file from PuTTYgen which worked. I had been confusing the server key received initially with the authentication key. Once I realised the difference, it all made more sense.

Best regards & seasons greetings,

Stuart
by stuartclennett
Fri 18 Dec 2020 19:15
Forum: SecureBridge
Topic: TCRSSHIOHandler + TMyConnection = "Open Failed"
Replies: 4
Views: 3052

Re: TCRSSHIOHandler + TMyConnection = "Open Failed"

Hi Viktor,

Thanks for getting back to me. The webserver I was trying to connect to disallows port forwarding over SSH so that's why it's not working. I have moved the database to an Amz RDS instance & MyDAC connects successfully to that. (I am using the trial but will purchase a license now that it's working)

Thanks & seasons greetings

Stuart
by stuartclennett
Fri 18 Dec 2020 15:15
Forum: SecureBridge
Topic: SecureBridge demo CRSSHIO failed
Replies: 14
Views: 7261

Re: SecureBridge demo CRSSHIO failed

I had exactly the same problem.

I discovered that port forwarding was disabled for SSH by the ISP.
by stuartclennett
Fri 18 Dec 2020 15:15
Forum: SecureBridge
Topic: TCRSSHIOHandler + TMyConnection = "Open Failed"
Replies: 4
Views: 3052

Re: TCRSSHIOHandler + TMyConnection = "Open Failed"

Solution:

Seems my ISP has turned off port forwarding for SSH connections, which means this solution would not work.
by stuartclennett
Fri 18 Dec 2020 10:27
Forum: SecureBridge
Topic: TCRSSHIOHandler + TMyConnection = "Open Failed"
Replies: 4
Views: 3052

TCRSSHIOHandler + TMyConnection = "Open Failed"

Hi,

Note, I have recently inherited this project a couple of days ago and I'm completely new to this project and MyDAC/SecureBridge

I've got my TScSSHClient working & I've followed the steps in https://www.devart.com/mydac/docs/ssh.htm, but when I try to set Connection1.Connected := TRUE I get Open Failed (EScError).

I've traced this to TCRSSHIOHandler.Connect(...) line 147 (Channel.Connect). So the CRSSHIOHandler is creating it's own TScSSHChannel instance.

The strange thing is that there's already a TScSSHChannel component on the datamodule which is set up (by previous programmer) and connects ok in the code. TBH I don't really know why that channel component is there if CRSSHIOHandler is creating it's own instance internally.

The server is web server, I can use PUTTY (default settings) to connect to MySQL on localhost:3306.

This post exactly describes my problem: viewtopic.php?t=35202 but unfortunately remains unsolved.

Can anyone point me in the right direction here?

Thanks
by stuartclennett
Thu 17 Dec 2020 15:11
Forum: SecureBridge
Topic: Unable to connect - Host key not verified/Authentication Failed
Replies: 8
Views: 14008

Re: Unable to connect - Host key not verified/Authentication Failed

Solution:

The fingerprint of the key I was getting was that of the server - not my authentication keys.

I just needed to use the code from this thread to store the key : viewtopic.php?f=27&t=40688&p=171590#p171590

Then I needed to import my PPK file using coding from this thread: viewtopic.php?t=36626

This ppk file (from PuTTYgen) is the actual authentication.

Here's my updated connection code if it will help anyone else https://pastebin.com/GPGXVCzi
by stuartclennett
Wed 16 Dec 2020 13:25
Forum: SecureBridge
Topic: Unable to connect - Host key not verified/Authentication Failed
Replies: 8
Views: 14008

Unable to connect - Host key not verified/Authentication Failed

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*