Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 2nd, 2010, 10:10 AM
crazyshady crazyshady is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Location: Dela-Where?
Posts: 42 crazyshady User rank is Private First Class (20 - 50 Reputation Level)crazyshady User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 6 h 39 m 54 sec
Reputation Power: 7
Send a message via AIM to crazyshady
Facebook MySpace
SSH Key-Gen

Hello,

I am trying to set up a SSH key between servers so no password is required when I have to "scp" files between the two.

This is what I have tried so far but still requires a password:

Code:
ssh-keygen -t rsa
scp /home/<user>/.ssh/id_rsa <server2.com>:/home/<user>/.ssh/athorized_keys


When I scp after this I wasn't expecting to need a password but it is still prompting. Now I have used this same method before and it has worked great. The only difference this time is server2 is not in the same cage.

Is there something I might be doing wrong?

Thanks
__________________
"Bart Stop Pestering Satan!" - Marge Simpson

Reply With Quote
  #2  
Old November 3rd, 2010, 05:34 AM
SimonJM SimonJM is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Mar 2006
Posts: 2,111 SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 7 h 43 m 38 sec
Reputation Power: 1485
Code:
~/.ssh/id_rsa.pub
             Contains the protocol version 2 RSA public key for authentica-
             tion.  The contents of this file should be added to
             ~/.ssh/authorized_keys on all machines where the user wishes to
             log in using public key authentication.  There is no need to keep
             the contents of this file secret.
__________________
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc

Reply With Quote
  #3  
Old November 3rd, 2010, 07:54 AM
crazyshady crazyshady is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Location: Dela-Where?
Posts: 42 crazyshady User rank is Private First Class (20 - 50 Reputation Level)crazyshady User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 6 h 39 m 54 sec
Reputation Power: 7
Send a message via AIM to crazyshady
Facebook MySpace
Quote:
Originally Posted by SimonJM
Code:
~/.ssh/id_rsa.pub
             Contains the protocol version 2 RSA public key for authentica-
             tion.  The contents of this file should be added to
             ~/.ssh/authorized_keys on all machines where the user wishes to
             log in using public key authentication.  There is no need to keep
             the contents of this file secret.


I have verified that the key is in the authorized_keys file. When I turn on debugging for scp it shows it offering the rsa public keys but then proceeds to the next step like it was not accepted.

Reply With Quote
  #4  
Old November 3rd, 2010, 05:24 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,256 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 18 h 41 m 25 sec
Reputation Power: 4445
Just out of curiosity, did you generate your key to require a passphrase? I usually don't, and haven't had the problem you describe.

I usually use a script that Fedora provides 'ssh-copy-id' to install the key on the remote machine too, if you have that script you might give it a try.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #5  
Old November 9th, 2010, 12:53 PM
crazyshady crazyshady is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Location: Dela-Where?
Posts: 42 crazyshady User rank is Private First Class (20 - 50 Reputation Level)crazyshady User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 6 h 39 m 54 sec
Reputation Power: 7
Send a message via AIM to crazyshady
Facebook MySpace
Quote:
Originally Posted by Doug G
Just out of curiosity, did you generate your key to require a passphrase? I usually don't, and haven't had the problem you describe.

I usually use a script that Fedora provides 'ssh-copy-id' to install the key on the remote machine too, if you have that script you might give it a try.


Actually I discovered the issue had nothing to do with the key. The remote server had a permission issue which prevented the keys from being read. Fixed the permission and bingo it worked.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > SSH Key-Gen

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap