Powered By Blogger

Tuesday, July 13, 2010

Setup SCP between hosts

1) Make sure id is created/available on both hosts (For following example Server names are "Ahost" and "Bhost" and the user is "test").
2) Login to Server Ahost and execute following commands with the user test if .ssh directory is not available
--> ssh-keygen -t rsa
Select default values
--> cd .ssh
scp id_rsa.pub Bhost:~test/.ssh/authorized_keys
scp id_rsa.pub Ahost:/apps/sasavr/.ssh/authorized_keys
(Note: if .ssh directory is not available on destination servers, create this directory on Ahost and Bhost)

Login to Ahost and Bhost with test user
--> chmod 700 .ssh
--> cd .ssh
--> chmod 600 authorized_keys

After executing all commands, we can scp from Ahost to Bhost without password for test user.

No comments:

Post a Comment

Welcome to the UNIX world