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

Re: ssh keys from two behind-the-firewall boxes?



On Sat, Feb 01, 2003 at 02:57:01AM +0100, Jean-Marc V. Liotier wrote:
> On Sat, 2003-02-01 at 01:55, Matthew Daubenspeck wrote:
> > Does anyone have a FAQ on how to set this all up?
> 
> Below is what worked for me. I think that it may vary according to the
> version of the SSH protocol that you want to use, but it works like that
> on a stock Debian unstable.
> 
> # On the local host :
> ssh-keygen -t dsa -f id_dsa
> # When prompted for a password, just press 'enter'.
> scp id_dsa.pub username@remote.host.net:~/
> 
> # On the remote host :
> test -d ~/.ssh || mkdir ~/.ssh
> chmod 700 ~/.ssh
> cd ~/.ssh
> touch authorized_keys2
> cat ~/id_dsa.pub >> authorized_keys2
> chmod 640 authorized_keys2
> rm -f ~/id_dsa.pub

authorized_keys2 is for backward compatibility. You can simply use
authorized_keys.

The ssh-copy-id script shipped with ssh automates this process, except
for the initial ssh-keygen stage.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: