Want to copy linux files using scp without entering password each time

Experts:

I am trying to copy files to a server out on the Internet without having to type in a password everytime.  I am going from a local linux (fedora 6) box to another linux box (Cent 4).  My command is:

scp /home/tayloe/filename   tayloe@70.86.x.x:/home/tayloe

It works, but it makes me enter a password each time.  I generated a key pair on the local box (using ssh-keygen -t rsa) and copied the contents of the resulting id_rsa.pub file to a file called authorized_keys on the remote box.  The authorized keys file is in the following 2 directories on the remote box:

/home/tayloe
/home/tayloe/.ssh

I wasn't sure which directory it should be in, so I put it in both.  That procedure is supposed to make it so it stops asking for a password each time, but it still does.  

Help!!

Tnic
tayloenicAsked:
Who is Participating?
 
TintinConnect With a Mentor Commented:
Make sure perms on your .ssh directory are 700
0
 
Jan SpringerConnect With a Mentor Commented:
scp -i /home/tayloe/.ssh/id_rsa  /home/tayloe/filename  tayloe@70.86.x.x:/home/tayloe/.

And the authorized_keys file belongs in the .ssh directory on the remote.
0
 
nociConnect With a Mentor Software EngineerCommented:
Also, if Kerberos is available (&configured) then you can enter your password once for all accesses throughout the kerberos domain.
Enter the password using kinit.
Both ssh & scp are capable of using the kerberos tickets you received.
0
 
ssemenyukConnect With a Mentor Commented:
HI,

authorized_keys should be in the home directory on the server, i.e. /home/tayloe/.ssh in your case. You can also try creating authorized_keys2, or just symlink it to authorized_keys.

Use either -i option for scp or add
Host 70.86.x.x
  IdentityFile  /home/tayloe/.ssh/id_rsa

to /home/tayloe/.ssh/config on your client box

0
 
tayloenicAuthor Commented:
Folks:

Problem is solved.  I had permissions set too permissive on the server.  I didn't know they could be too permissive!!  I gave tintin the most points because he gave the correct answer even though it took me a while to figure that out.  Thanks to all for responding.

Tnic
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.