[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: ssh-keygen



David Watson wrote:
On Tue, 19 Aug 2008 09:29:26 +0100
Bob Cox <debian-user@lists.bobcox.com> wrote:
This is how I do it when setting up a new machine:

ssh-keygen -t dsa
<enter, enter, enter>
cat ~/.ssh/id_dsa.pub | ssh me@otherhost 'cat
.ssh/authorized_keys2' <enter password>
Then:
ssh me@otherhost (should work without password)


To copy the key to the remote host you may can also use the following
command:

ssh-copy-id me@otherhost

which takes care of copying to the right location and ensuring the
permissions are set correctly.



Your example works _if_ you are using rsa keys.  If using a dsa key
use ssh-copy-id -i ~/.ssh/id.dsa.pub me@otherhost

Regards

Wayne


Reply to: