Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need help with no password ssh and ssh-agent [SOLVED]
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
gnychis
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1004
Location: Pittsburgh, PA

PostPosted: Fri Feb 09, 2007 1:27 am    Post subject: need help with no password ssh and ssh-agent [SOLVED] Reply with quote

Hey all,

I've looked at like 5 different guides for no password ssh and they all say the same thing... and I've done this over and over and can't get it.

First I create my id_dsa:
Code:

ssh-keygen -t dsa


Then I scp it over to the server machine, and append it to ~/.ssh/authorized_keys

Now when I try to ssh, it asks me for the passphrase for ~/.ssh/id_dsa and logs me in without ever asking me for the ssh password also.

Now I want it to not ask me for the id_dsa password... guides are telling me to use ssh-agent, however:
Code:

bash-2.05b$ ssh-agent /usr1/gnychis/.ssh/id_dsa
/usr1/gnychis/.ssh/id_dsa: Permission denied
bash-2.05b$ ls -la /usr1/gnychis/.ssh/ | grep id_dsa
-rw-------    1 gnychis  users         736 Feb  8 20:18 id_dsa
bash-2.05b$ whoami
gnychis


I can't figure this out, this is happening on *all* of my machines.

Any clues? I have root on the client machines, but not on the server machine.

Thanks!
George
_________________
<---- me and Richard Stallman :)


Last edited by gnychis on Fri Feb 09, 2007 3:09 am; edited 1 time in total
Back to top
View user's profile Send private message
Dan
Veteran
Veteran


Joined: 25 Oct 2005
Posts: 1302

PostPosted: Fri Feb 09, 2007 1:46 am    Post subject: Reply with quote

use ssh-add
it will ask you for your password and once its added you are done, you can login to any machine you have dropped your key into without a password. next reboot add it again with "ssh-add"
_________________
- Failure is not an option. It's bundled with your software.
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Fri Feb 09, 2007 1:51 am    Post subject: Reply with quote

did you try the keychain guides? it has worked very well for me.
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Feb 09, 2007 2:22 am    Post subject: Reply with quote

http://www.gentoo.org/doc/en/keychain-guide.xml
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Fri Feb 09, 2007 2:52 am    Post subject: Reply with quote

Quote:
Now when I try to ssh, it asks me for the passphrase for ~/.ssh/id_dsa and logs me in without ever asking me for the ssh password also.


Sorry - this is a dumb question but, you didn't give your dsa key
a password did you?
Back to top
View user's profile Send private message
gnychis
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1004
Location: Pittsburgh, PA

PostPosted: Fri Feb 09, 2007 3:09 am    Post subject: Reply with quote

albright wrote:
Quote:
Now when I try to ssh, it asks me for the passphrase for ~/.ssh/id_dsa and logs me in without ever asking me for the ssh password also.


Sorry - this is a dumb question but, you didn't give your dsa key
a password did you?


/me lowers his head, covers his face, and walks away slowly...

thanks :)
_________________
<---- me and Richard Stallman :)
Back to top
View user's profile Send private message
astor84
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2007
Posts: 96
Location: Dallas, Tx

PostPosted: Fri Feb 09, 2007 4:34 am    Post subject: Reply with quote

gnychis wrote:
albright wrote:
Quote:
Now when I try to ssh, it asks me for the passphrase for ~/.ssh/id_dsa and logs me in without ever asking me for the ssh password also.


Sorry - this is a dumb question but, you didn't give your dsa key
a password did you?


/me lowers his head, covers his face, and walks away slowly...

thanks :)

Don't just make private keys without passphrases: this is a BAD idea. Read the keychain guide (a someone a couple posts up linked to it). It takes a little longer to get it going, but once it works, it will be worth it. You will have to type your password once per boot, and then keychain will load your private key into ssh-agent and remember which ssh-agent process has it loaded so that you can have it available for all shells.\

Not using passphrases (and keychain) is just plain dumb. If someone were to get a copy of your private key they would have access to all of those boxes.
Back to top
View user's profile Send private message
gnychis
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1004
Location: Pittsburgh, PA

PostPosted: Fri Feb 09, 2007 5:13 am    Post subject: Reply with quote

its a single client to a single server and its temporary for ~2 days while some scp's go to work... so i'm not too worried about

will keep that in mind though
_________________
<---- me and Richard Stallman :)
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