[TriLUG] help with scp

Michael Thompson thompson at easternrad.com
Tue Jul 15 10:04:15 EDT 2003


Oh yeah, you can also use ssh-agent and use a passphrase but this works
for me and it was fairly easy so...

:)

--mwt

On Tue, 2003-07-15 at 10:01, Michael Thompson wrote:
> Here is my cheat-sheet for RSA keys and ssh authentication, hope this
> helps!  (If anyone sees a problem, please let me know...)
> 
> --mwt
> 
> <start>
> How to use ssh with rsa keys to authenticate without passwords. 
> (For running scripts as cron jobs) 
> 
> This assumes that ssh is installed and configured on both clients and
> servers.
> 
> On the client machine: 
> Use ssh-keygen -t rsa to create a private and public key pair, DO NOT
> INSERT A PASSWORD. If you use the default settings, use will end up with
> two files: $HOME/.ssh/id_rsa and $HOME/.ssh/id_rsa.pub. (Note: $HOME =
> your home directory.) The id_rsa file should be chmod 600, the
> id_rsa.pub can be 644. Also note that the $HOME/.ssh directory should be
> chmod 600 on both clients and servers otherwise rsa authentication will
> not work.(See below *)
> 
> On the server machine:
> Copy the id_rsa.pub file to the $HOME/.ssh directory and insert it into
> a file called $HOME/.ssh/authorized_keys. You can use 'cat id_rsa.pub >>
> authorized_keys' to do this. The authorized_keys file should be chmod
> 644.
> 
> If you created your rsa key without a pass phrase this should allow you
> to ssh to the server without a password. 
> 
> * NOTE: chmod 600 on $HOME/.ssh directory will only work for the root
> user. For regular users, use chmod 700 $HOME/.ssh.
> 
> <end>
> 
> On Tue, 2003-07-15 at 09:51, Daniel Monjar wrote:
> > I have a several systems I routinely move files and ssh 'login' between.  I 
> > know that by taking my public key and placing it somewhere on the target 
> > system, like in known hosts or some other file, I can do all of this 
> > without having to enter my password.  I know this because I did it once a 
> > couple of years ago... but age has taken its toll and I can't get the 
> > incantation quite right.
> > 
> > so, the question is:
> > 
> > Assume I have system 1 and 2, what do I put where to be able to scp from 1 
> > to 2 without having to type in my password?
> > 
> > 
> > --
> > Daniel Monjar
> > Manager, Technical Services
> > bioMérieux, Inc.
> > Durham, NC US
> -- 
> Michael Thompson <thompson at easternrad.com>
-- 
Michael Thompson <thompson at easternrad.com>





More information about the TriLUG mailing list