How to set up ssh connection between two servers for user oracle
1. connect to the remote system as user oracle
2. rm -rf $HOME/.ssh
3. /usr/local/bin/ssh-keygen -t dsa -f "$HOME/.ssh/id_dsa" -N ""
or: /usr/bin/ssh-keygen -t dsa -f "$HOME/.ssh/id_dsa" -N ""
4. cd $HOME/.ssh
5. cat id_dsa.pub >> authorized_keys2
6. check local connection, i.e. the following command should now work without having to enter a password (you might have to confirm with "yes" the first time, though):
ssh localhost date
If it doesn't work, i.e. if you're prompted to enter oracle's password, please check ownership and permissions on $HOME, it should owned by oracle:dba with permissions 755, i.e.:
ls -ld $HOME
drwxr-xr-x 10 oracle dba 5120 Jun 26 17:07 /app/oracle
7. Logon to the remote machine as user oracle.
8. Repeat the procedure above
9. When done, put the contents of id_dsa.pub in the other server's autorized_keys2 file.
10. Exchange is now done. You should be able to use ssh in both directions between the servers.
No comments:
Post a Comment