LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-16-2012, 12:16 AM   #1
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
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-16-2012 at 12:31 AM.
 
Old 02-16-2012, 12:38 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Did you give it a passphrase or just <Enter> at the prompt?
 
Old 02-16-2012, 12:50 AM   #3
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Original Poster
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-16-2012, 12:57 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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, 01:04 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,362

Rep: Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004
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, 01:10 AM   #6
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Original Poster
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


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


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