I have 3 suse linux boxes at my disposal currently and wanted to configure the 3 in such a way that scp commands from and to either of these 3 boxes would work without manual intervention.
Box 1 : SuSE Linux 9 ssh -V : OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7b 10 Apr 2003
Box 2 : SuSE Linux 9 ssh -V : OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7b 10 Apr 2003
Box 3 : SuSE Linux Enterprise Server 9 ssh -V : OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7d 17 Mar 2004
I managed to get the automatic scp(without passwords) working between Box1-> Box2 quite easily...both ways. From Box 2 -> Box 3 it also works fine. But when I try the same from Box3->Box2....THIS doesn't work. Unfortunately this is the one I need the most!!!
I followed the regular procedure....generated the keys using:
ssh-keygen -t rsa
on the machine I want to send FROM
and appended the resultant public key(id_rsa.pub) to the ~/.ssh/authorized_keys file on the machine to be sent TO.
Works like a charm in all scenarios EXCEPT the one specified above(Box3->Box2).
Also, in one of the umpteen discussions I found on the subject(in EE) someone had suggested the following for running scp commands in a script:
echo "password" | scp user@machine:/home/user/re
Although I wouldn't go for this method....since it is very insecure.....I was prepared to try it as an interim arrangement...till I found what exactly was wrong. But this doesn't work either....it still asks for a password!! I wonder how the solution was "accepted"?!! Here it is: