Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSH Keys
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jtrooney
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2004
Posts: 82

PostPosted: Mon Apr 25, 2005 6:09 pm    Post subject: SSH Keys Reply with quote

Hey guys...I'm trying to reimplement a backup utility on a couple of my servers at work. The way this works is it is a script that connects as root to to the others, using a public key and ssh, and executes an rsync command. This is up and running with out a problem but I need to add this functionality over to another server as well and am having trouble getting this up and running. I have created an ssh key using
Code:
ssh-keygen -b 1024 -t rsa

and have copied that id_rsa.pub data over to the other servers authorized file. When ever I try to ssh over it still prompts me for a password for the server I am connecting too. Any idea as to what I'm missing? I can post any files that are necessary. Thanks in advance

Jeff
Back to top
View user's profile Send private message
lopez
n00b
n00b


Joined: 24 Jun 2004
Posts: 52
Location: Toledo, OH USA

PostPosted: Mon Apr 25, 2005 6:57 pm    Post subject: Reply with quote

check your permissions on your .ssh dir and authorized_keys
Code:
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
Back to top
View user's profile Send private message
bigfunkymo
Apprentice
Apprentice


Joined: 23 Jan 2004
Posts: 237

PostPosted: Mon Apr 25, 2005 6:57 pm    Post subject: Reply with quote

are you running your ssh agent?
_________________
[No package... Grabbing a set.]
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Mon Apr 25, 2005 6:59 pm    Post subject: Reply with quote

See my blog entries on SSH and backups:
http://technocrat.watson-wilson.ca/blosxom/computer/ssh-howto.html
http://technocrat.watson-wilson.ca/blosxom/blosxom/computer/backup.html

I would advise against doing this as root. Why not copy the backup files as a different user? Things to check:
1. Permissions of the key files must be 644 for public and 600 for private.
2. Try ssh -vvv to see debugging information.
3. Check the server logs.
4. Does the ssh server permit root logins?
_________________
The true guru is a teacher.
Neil Watson
Back to top
View user's profile Send private message
jtrooney
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2004
Posts: 82

PostPosted: Mon Apr 25, 2005 11:52 pm    Post subject: Reply with quote

First off...thanks for the fast replies guys =) I went ahead and double double checked the permissions and it is working now. The only problem is that i have to enter the passphrase everytime inorder for this to work. How can I create a key so that I won't need to enter the passphrase?

BTW I'm just trying to mirror our current setup over to a new server. After looking at the authorized keys on the other servers I noticed that the other keeys look something like
Code:
1024 35 121216546456511321.....

and the keys that I am generating are completely different
Code:
ssh-rsa AAAAB3NsfsdfesfxF....


Any ideas? Thanks in advance
Back to top
View user's profile Send private message
lopez
n00b
n00b


Joined: 24 Jun 2004
Posts: 52
Location: Toledo, OH USA

PostPosted: Tue Apr 26, 2005 1:56 am    Post subject: Reply with quote

If you don't want a passphrase don't enter any when you create your rsa/dsa private key.
Its not the best way without a passphrase though I suggest using ssh-agent.

Here is a nice article to get you going:
http://www-106.ibm.com/developerworks/library/l-keyc2/
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Tue Apr 26, 2005 1:46 pm    Post subject: Reply with quote

*edit nm
_________________
write quit bang
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum