LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-15-2012, 11:16 PM   #1
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
ssh passphrase question


Hello
OS : RHEL 5.2
I generated a RSA key using
Code:
#ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
1b:38:b5:b9:1b:8e:28:8a:da:04:3f:5d:25:1c:e6:6a root@server.example.com
And copied the id_rsa.pub key to hosts /root/.ssh/authorized_keys

but now when I try to ssh it still prompts me for the passphrase but I don't want it to ask any password or passphrase. As soon as I do ssh, the machine should connect to remote host.

Am I missing something?

Last edited by deep27ak; 02-15-2012 at 11:31 PM.
 
Old 02-15-2012, 11:38 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Did you give it a passphrase or just <Enter> at the prompt?
 
Old 02-15-2012, 11:50 PM   #3
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195

Original Poster
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
No, I have supplied a passphrase to it

Am I suppose to give a blank passphrase i.e just "enter"?
 
Old 02-15-2012, 11:57 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Exactly; passphrase should be just <Enter> if you DON'T want one eg want to be able to automate cxns.
Passphrase is basically a passwd to access the relevant auth-key: its optional
 
1 members found this post helpful.
Old 02-16-2012, 12:04 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
And if that doesn't work, it's possible the permissions on the authorized_keys file are jacked:

Code:
chmod 750 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
If the permissions aren't right, ssh won't use the file.
 
Old 02-16-2012, 12:10 AM   #6
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195

Original Poster
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Thanks chrism01

That did the trick

True enough suicidaleggroll
But if it is prompting me for passphrase then it surely means that ssh is able to read the authorized_keys file.
If it would have been a permission issue it wouldn't have prompted me for passphrase in the first case but yes it plays its part for not allowing any other users to make any change in this file.
 
  


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
ssh asking for passphrase when I didn't set one garyozzy Linux - Server 5 12-13-2011 03:26 PM
How to enable passphrase for access via ssh me_spearhead Linux - Security 6 05-19-2011 09:18 AM
SSH RSA passphrase in script ? jonaskellens Linux - Newbie 2 11-08-2010 10:34 AM
SSH without a password or passphrase Chocolate Linux - Networking 4 03-04-2007 02:59 AM
ssh / ssh-key -- its always asking for passphrase BaerRS Linux - General 1 01-07-2003 06:21 PM

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

All times are GMT -5. The time now is 09:37 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