LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 04:55 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

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, 04:58 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

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

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

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 05:31 AM.
 
Old 03-15-2010, 06:09 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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



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 06:45 PM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
need help with no password ssh and ssh-agent hedpe Linux - Networking 3 02-08-2007 08:49 PM
ssh-agent/ssh-add question mega Slackware 2 01-26-2005 03:09 AM
ssh-agent podollb Linux - Networking 15 10-16-2003 12:51 AM

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

All times are GMT -5. The time now is 06:18 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
Open Source Consulting | Domain Registration