LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

ssh setup

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: ssh setup
From: "David A. Sinck" <lvs-lists@xxxxxxxxxxxxxx>
Date: Tue, 9 Jul 2002 05:54:40 -0700
\_ SMTP quoth mixo on 7/9/2002 14:36 as having spake thusly:
\_
\_ 
\_ How can I configure rsh/ssh to enable copying of files  between 2 
\_ machines without
\_ human intervention?

There might be a shorter path, but this should work:

machine_a user1$ ssh-keygen
# generates local key on machine_a

machine_a user1$ ssh machine_b -l user2
# sets up known_hosts for machine_b on machine_a, leaves you on machine_b

machine_b user2$ ssh-keygen
# generates local key on machine_b

machine_b user2$ ssh mahine_a -l user1
# sets up known_hosts for machine_a on machine_b, leaves you on machine_a

machine_a user1$ scp ~/.ssh/identity.pub user2@machine_b:.ssh/authorized_keys
machine_a user1$ scp ~/.ssh/id_dsa.pub user2@machine_b:.ssh/authorized_keys2
# copies over identity files to user2@machine_b

machine_a user1$ exit
# return from one leg of the trip

machine_b user2$ scp ~/.ssh/identity.pub user1@machine_a:.ssh/authorized_keys
machine_b user2$ scp ~/.ssh/id_dsa.pub user1@machine_a:.ssh/authorized_keys2
# copies over identity files to user1@machine_a

machine_b user2$ exit
# return from the other leg of the trip

machine_a user1$ scp my_test_file user2@machine_b:/tmp
# test

This assumes that user1 != user2 and that you want separate identity
files. 

YMMV.

David


<Prev in Thread] Current Thread [Next in Thread>