I try to configure login without password beetwhen two server.
Both servers are Linux Oracle 6.3
/usr/bin/ssh-keygen -t rsa
cat id_rsa.pub >> authorized_keys
scp authorized_keys2 racnode2:~/.ssh/
ssh racnode1 date
The following should work. Remember to login as the user for whom this is for.
mkdir -p ~/.ssh
chmod 700 ~/.ssh
rm -f ~/.ssh/id_dsa
ssh-keygen -t dsa -N "" -f ~/.ssh/id_dsa
ssh oracle@node2 "mkdir -p .ssh; chmod 700 .ssh"
ssh oracle@node2 "echo "$KEY" >> .ssh/authorized_keys; chmod 644 .ssh/authorized_keys"
Then to the same from the other host2 to host1. I would recommend to use DSA encryption to make it work for SCP and SFTP too.
For more info, see 3) Set up SSH user equivalence for SCP and SFTP
Thread: OL5 Howto: Installing and using cURL with support for SCP and SFTP OL5 Howto: Installing and using cURL with support for SCP and SFTP
Sounds like you have fetched the public key from the remote host rather than sending your public key to the remote host.
Using ssh-add you are experiencing the desired affect, but are probably using different methods:
The ssh-add utility is used in connection with the ssh-agent. An SSH agent is a program that responds to authentication-related queries from SSH clients. It can be used to save your passphrase so that you do not have to enter it each time you initiate an ssh or scp connection. If I remember it works similar to a "keychain" which will last for your current session and you will have to use the initial ssh-add followed by the password each time.