You want run ssh commands from hostname1 on hostname2 without using a password:


1. Run this command from hostname1:

> ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''


2. Copy to server hostname2:


scp $HOME/.ssh/id_dsa.pub hostname2:/home/oracle/.ssh



3. On the server hostname2 run the following commands:

> cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
> echo "IdentityFile ~/.ssh/id_dsa" >> $HOME/.ssh/config
> chmod 600 *
> ls -lF


4. From hostname1:

> ssh hostname2 /usr/bin/hostname