LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-15-2010, 05:55 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Remove stored identities from ssh-agent


Dear All,

I have added an identity to ssh-agent
Code:
ssh-agent /bin/bash
ssh-add ~/.ssh/id_dsa
After restarting the machine. I removed all the identities by
Code:
[vinay@vinay asterisk]$ ssh-add -d ~/.ssh/id_dsa
Bad key file /home/vinay/.ssh/id_dsa
[vinay@vinay asterisk]$ ssh-add -D ~/.ssh/id_dsa
All identities removed.
Now when I try to login to a machine, it still asks for passphrase, why is this ?
Code:
[vinay@vinay asterisk]$ ssh vinay@localhost
Enter passphrase for key '/home/vinay/.ssh/id_dsa':
 
Old 03-15-2010, 05:58 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Isn't that the expected behavior? The ssh-agent has not identities.

Evo2.
 
Old 03-15-2010, 06:28 AM   #3
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by evo2 View Post
Isn't that the expected behavior? The ssh-agent has not identities.

Evo2.
Thanks for reply evo2.

As per my understanding If it doesn't have identities, then it should directly ask for password. why is it asking for pass pharse ?

Normally it won't ask for password if the identity is stored, it just asks for pass phrase. Here after asking for pass phrase its asking for password too, even after removing the identity from ssh-agent.

How can I stop this behavior, I mean it should directly ask for password. It should stop asking pass phrase.

Last edited by vinaytp; 03-15-2010 at 06:31 AM.
 
Old 03-15-2010, 07:09 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
I think it depends on how the client is set up. You can specify with the PreferredAuthentications field in your .ssh/config or /etc/ssh/ssh_config. According to the ssh_config man page on my system, the default order is:

gssapi-with-mic, hostbased, publickey, keyboard-interactive, password

You can also override this on the command line.

Cheers,

Evo2.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ssh-agent -> The agent has no identities. windstory Linux - Security 2 11-19-2008 07:45 PM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
need help with no password ssh and ssh-agent hedpe Linux - Networking 3 02-08-2007 09:49 PM
ssh-agent/ssh-add question mega Slackware 2 01-26-2005 04:09 AM
ssh-agent podollb Linux - Networking 15 10-16-2003 01:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration