[KLUG Members] scp

Bruce Smith members@kalamazoolinux.org
09 Mar 2003 08:18:18 -0500


> > Need a little help copying my new dsa key from my client to my host.  
> > Anyone have an example of this.  I'm using ssh-2 on an OS X laptop and 
> > Suse 8.0 Pro as a desktop.
> 
> The easy way.
> 
> cd ~/.ssh 
> cat id_dsa.pub | ssh host 'cat >> ~/.ssh/authorized_keys2'
> 
> (replace host with the host or ip address as required)
> 
> scp will overwrite.  You may already have other keys in the
> authorized_keys file and not want to use scp.  _OR_  Use scp to copy the
> file to deleteme and then use vi with mouse drag drops or whatever
> method you choose like redirection to succeed.  As long as the result is
> to append the contents of id_dsa from the client to the authorized_keys2
> file on the server.

If you're creating the public key for the FIRST TIME on this computer,
be VERY careful about permissions.  Sometimes using the defaults when
creating the ~/.ssh/authorized_keys2 OR the ~.ssh/ directory, it will
give WRITE permissions to the GROUP.  This will cause your keys to FAIL
every time.  This drove me nuts for the longest time, back when I tried
first tried to get RSA/DSA authorization working.  (read permissions are
OK on the file and directory, but not required)

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------