Thks for the answers.
I've checked the network connexions between machines A/B/C, which are ok at least from the ping
Distro are machine A (Ubuntu9.04), Machine B (Debian Lenny) and Machine C (Linux 2.6.24).
It's now working as I reinstalled from scratch ssh
on machine B (quite easy with a DEBIAN distro
I don't know the reason why it was not working, I've only some assumptions in case it could be a clue for sbdy else:
Machine B was running a cronjob to backup some tarballs to machine C but I guess some code lines did corrupt the ssh daemon (due to very bad redirections),
Machine B cronjob was also trying to ssh login to machine C, which banned MachineB.
Solution I followed (by memory of a love night with my network
- Restart sshd daemon on machines A and C
- then all actions on machine B :
- Purge and reinstall ssh, openssh-client and server
- check public key chmod (dir 600 and file 644)
- check/adapt ssh client configuration /etc/ssh/ssh_config,
- reload the new ssh configuration: /etc/init.d/ssh reload
- checked that ssh port is listening: netstat -na | grep :_port
- checked that ssh process has been started: ps -ef | grep ssh
- test ssh connexion to machines A and C: ssh -p port host
- generate a pair of dsa keys: ssh-keygen -t -dsa
- copy the public key to the ssh host machines A and C into autorized_keys
- start ssh-agent and test again ssh connection and remote copy scp
Now the point is the following (in fact this was the starting point of all the problems above...): I want to start a cronjob (scp/rsync) from machine B to machine C, but the shell is working "manually" but not as a crontask (it works but not the part with scp/rsync). Despite root is launching the cronjob and files are chmoded accordingly.
- connexion is working and effective but I get a debug msg on Machine B ssh client to connect machine C, when entering the passphrase (it works but) :
debug3: Received SSH2_MSG_IGNORE
It looks like this is due to the client ssh_config on machine B again as I do not get this from machine A to the same machine C ssh server.
- How to allow the cronjob to scp/rsync from machine B to machine C, as ssh-agent seems inoperant for this .. ?
Difficult ... !