LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 10-12-2004, 05:32 PM   #1
alon005
LQ Newbie
 
Registered: Oct 2004
Posts: 9

Rep: Reputation: 0
SSH keys


I have been sent a pair of keys generated on remote host. I placed both keys in ~/.ssh and ~/.ssh2, however, I can't connect to the remote system when I run ssh user@host with a message Persmission denied (public key). I know the keys are correct and I don't have access to remote system, to sshd.

Other clients are able to connect to remote host using the keys.
Version of ssh is 3.8.1p.

Any help would be appricated
 
Old 10-12-2004, 09:03 PM   #2
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
Just to clarify, you did put them in ~/.ssh/authorized_keys, correct? (e.g. cat key1.pub >> ~/.ssh/authorized_keys) What does /var/log/secure say? Is it possible your sshd is configured to look for keys in some other file?
 
Old 10-12-2004, 09:47 PM   #3
alon005
LQ Newbie
 
Registered: Oct 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by TruckStuff
Just to clarify, you did put them in ~/.ssh/authorized_keys, correct? (e.g. cat key1.pub >> ~/.ssh/authorized_keys) What does /var/log/secure say? Is it possible your sshd is configured to look for keys in some other file?
autorized_keys on the remote host to which i am trying to connect to?
I don't have access to it. Also, they keys on the remote host were generated properly and other hosts can connect to it using the same keys as I indicated in my original post.

Thanks for you reply.
 
Old 10-13-2004, 10:27 AM   #4
muman
LQ Newbie
 
Registered: Sep 2004
Posts: 11

Rep: Reputation: 0
Only ever really had problems other way round, but might be worth making sure your key folders are chmod 700 and the files themselves also..make sure they were ftp'ed and not copy/pasted (so there are no line breaks etc), I think ssh won't wont work if it feels something is insecure. Just possibilities I can think of.
 
Old 10-13-2004, 06:04 PM   #5
alon005
LQ Newbie
 
Registered: Oct 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by alon005
autorized_keys on the remote host to which i am trying to connect to?
I don't have access to it. Also, they keys on the remote host were generated properly and other hosts can connect to it using the same keys as I indicated in my original post.

Thanks for you reply.
If you have read my ealrier posts you'd have seen that I can connect to other hosts using .ssh .ssh2 holding the keys and these directories are chmod 'ed to 0700.

Could someone tell me where I could similar type questions?

I have to fix this problem soon, I suspect there's compatibility problem between protocol 1 and protocol 2

Thanks everyone for replies.
 
Old 10-14-2004, 03:39 AM   #6
muman
LQ Newbie
 
Registered: Sep 2004
Posts: 11

Rep: Reputation: 0
Hmm I'm probably blind, as just reread and you don't mention that you can connect to other hosts with them (but you do mention other hosts than you can connect to the remote), nor the chmod.

I think start from scratch and keep it clear as ssh keys can get messy if not extremely clear on everything, most problems are just a very simple to fix once its clear and its difficult for other people to fix ssh key problems without access without everything being extremely clear.

Tell us exactly what filenames you have in each folder and its permissions and parent permissions and the format of the contents of each file. Also what other filenames you have and are connecting to different hosts with that work. I know you probably feel you are probably repeating yourself, but there's nothing like having output pasted of everything, so new readers are as clear as you are on your settings.

Also do ssh -v user@host paste the output (or even ssh -vvv user@host will show more info), and paste it, hiding anything private.
 
  


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 keys exodist Linux - Networking 3 02-16-2005 10:16 AM
ssh keys merchtemeagle Linux - Newbie 4 10-12-2004 12:12 AM
ssh keys Lucasite Linux - Security 2 03-11-2004 12:43 PM
Configuring SSH to accept only keys (already have keys) fr0st Linux - Security 3 11-04-2003 03:31 AM
SSh Keys shaggz Linux - General 2 02-19-2003 09:09 PM


All times are GMT -5. The time now is 05:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration