Hi,
I have problems using ssh-commands (ssh 2.4) in a perl-cgi-script.
The command I'm using in the cgi-script:
ssh -l username servername 'command'
results following error message:
warning: You have no controlling tty. Cannot read confirmation. warning:
Authentication failed. Disconnected; key exchange or algorith negotiation
failed (Key exchange failed.).
If I execute exactly the same command in a shell, it works:
# ssh -l username servername 'command'
Host key not found from database.
Key fingerprint:
xifar-govik-homif-cuhuz-pucyb-luzeg-tolev-nyzyc-numyv-movas-vuxyx
You can get a public key's fingerprint by running
% ssh-keygen -F publickey.pub
on the keyfile.
Host key saved to /home/http/.ssh2/hostkeys/key_22_servername.pub
host key for servername, accepted by http Mon Feb 19 2001 14:27:16
Authentication successful.
I know that this occurs only when I contact the server for the first time
and I got the hostkey. When I start the cgi-script when I have already
received the hostkey, it works fine. But I have to find a solution where it
works even if I contact the server for the first time.
I would be grateful if anybody could help me.
Regards
Tino Barden