Page 1 of 1
The negotiation of host key verification algorithm is failed
Posted: Mon 09 Feb 2009 20:38
by snorkel
I have a client that is getting the error in the subject.
I had the user do a ssh -v while logged in to get he version number:
dhatoffice@05 ~ : ssh -v
OpenSSH_4.5p1 FreeBSD-20061110, OpenSSL 0.9.7e-p1 25 Oct 2004
They are using this hosting service:
http://highspeedrails.com/
The user reports he can connect via putty.exe without issue, but when using my app that uses SB, he gets:
The negotiation of host key verification algorithm is failed
Posted: Tue 10 Feb 2009 07:40
by Dimon
In order to solve the problem try to set the TScSSHClient.HostKeyAlgorithms.AsString property to 'ssh-rsa,ssh-dss'.
Posted: Tue 10 Feb 2009 14:38
by snorkel
Dimon wrote:In order to solve the problem try to set the TScSSHClient.HostKeyAlgorithms.AsString property to 'ssh-rsa,ssh-dss'.
I am pretty sure it's already set to that, but will double check.
Posted: Wed 11 Feb 2009 02:42
by snorkel
snorkel wrote:Dimon wrote:In order to solve the problem try to set the TScSSHClient.HostKeyAlgorithms.AsString property to 'ssh-rsa,ssh-dss'.
I am pretty sure it's already set to that, but will double check.
I was wrong, it was set to rsa only.
How do I set it to both in code at runtime?
Thanks,
Snorkel
Posted: Wed 11 Feb 2009 02:59
by snorkel
snorkel wrote:snorkel wrote:Dimon wrote:In order to solve the problem try to set the TScSSHClient.HostKeyAlgorithms.AsString property to 'ssh-rsa,ssh-dss'.
I am pretty sure it's already set to that, but will double check.
I was wrong, it was set to rsa only.
How do I set it to both in code at runtime?
Thanks,
Snorkel
This seemed to work:
dsa:= TScSSHHostKeyAlgorithmItem(fclient.HostKeyAlgorithms.Add);
dsa.Algorithm:=aadsa;
Don't know if that is best practice or not though.
Posted: Wed 11 Feb 2009 13:19
by Dimon
It is right. But the simpler way is the following code:
Code: Select all
Client.HostKeyAlgorithms.AsString := 'ssh-rsa,ssh-dss';
Posted: Wed 11 Feb 2009 16:29
by snorkel
Dimon wrote:It is right. But the simpler way is the following code:
Code: Select all
Client.HostKeyAlgorithms.AsString := 'ssh-rsa,ssh-dss';
Yes, that is much nicer. Thanks for the tip

I recompiled it so hopefully that takes care of the issue my client was seeing.
Thanks again,
Snorkel