On Feb 1, 2008 1:01 PM, Porkchop <[EMAIL PROTECTED]> wrote:

> On 01/02/08 07:19 -0500, John Mort wrote:
> > That looks straightforward enough, one question though.  When you scp
> > id_dsa.pub to porkchop.net:.ssh/authorized_keys, are you not
> > overwriting .ssh/authorized_keys?  The account I log into on this box
> > is an untrusted user account that he also uses, so I want to make sure
> > I don't mess up anything he has set up there.
>
> It would overwrite anything that was there. In my case, there was
> nothing there.
> If you want to add the new key, do something like:
>
> (on local machine)
> scp id_dsa.pub porkchop.net:freedom.key
> (on server)
> cat freedom.key >> .ssh/authorized_keys
> -porkchop


another alternative is the ssh-copy-id command

ssh-copy-id  -  install  your identity.pub in a remote machine's
authorized_keys

SYNOPSIS
       ssh-copy-id [-i [identity_file]] [EMAIL PROTECTED]

According to the man page:

"Once it has one or  more  fingerprints   (by   whatever  means)  it  uses
ssh  to  append  them  to
       ~/.ssh/authorized_keys on the remote machine (creating  the  file,
and
       directory, if necessary)"

Todd


>
> _______________________________________________
> Mid-Hudson Valley Linux Users Group                  http://mhvlug.org
> http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug
> Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium
>  Feb 6 - DBUS
>  Mar 5 - Setting up a platform-independent home/small office network using
> Linux
>
_______________________________________________
Mid-Hudson Valley Linux Users Group                  http://mhvlug.org          
   
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug                           
Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium          
        
  Feb 6 - DBUS
  Mar 5 - Setting up a platform-independent home/small office network using 
Linux

Reply via email to