LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-25-2004, 01:24 AM   #1
pioniere
Member
 
Registered: Dec 2002
Location: Vancouver Island, Canada
Distribution: Slackware
Posts: 46
Blog Entries: 1

Rep: Reputation: 15
Trouble configuring SSH publickey


Ok, I have done a lot of reading , and this *should* work, but it isn't.

Here is the situation: I am trying to use publickey authentication with SSH to access a Linux box on my private network. I have set this up elsewhere before and gotten it to work. Here, for some reason, it isn't.

Local permissions:

~/.ssh/ 700
id_rsa 600
id_rsa.pub 644

Remote permissions:

~/.ssh/ 700
authorized_keys 644

Of course, authorized keys contains the contents of the id_rsa.pub file

So, presuming all of that is correct, here is what happens when I try to connect:
Code:
$ ssh -v jeff@jupiter
OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to jupiter [192.168.0.55] port 22.
debug1: Connection established.
debug1: identity file /home/Jeff/.ssh/identity type -1
debug1: identity file /home/Jeff/.ssh/id_rsa type 1
debug1: identity file /home/Jeff/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'jupiter' is known and matches the RSA host key.
debug1: Found key in /home/Jeff/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interacti
ve
debug1: Next authentication method: publickey
debug1: Trying private key: /home/Jeff/.ssh/identity
debug1: Offering public key: /home/Jeff/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interacti
ve
debug1: Trying private key: /home/Jeff/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interacti
ve
debug1: Next authentication method: password
jeff@jupiter's password:
As you can see, the session gives up on the publickey and goes for the password.

I'm not sure what the problem is. It looks like here:
Code:
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
there may be an issue, since what it was sent and what it expected were different. Otherwise, I have no idea what the problem could be. If anyone could shed some light on this it would really be appreciated.

Thanks in advance
 
Old 05-29-2004, 07:24 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Could you restart sshd on the box you're ssh'ing to in debug mode and catch that log?
 
Old 06-28-2004, 08:28 PM   #3
mwhaycraft
LQ Newbie
 
Registered: Jun 2004
Location: Maryland
Distribution: Slackware
Posts: 1

Rep: Reputation: 0
authorized_keys can't be so open...

Set your authorized_keys to 600. (Unless you are using Cygwin then set it to 640 and make sure SYSTEM is the group of that file)
 
Old 07-01-2004, 07:22 PM   #4
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
I would set .ssh to 755 and then work back more restrictive 'til it fails.
 
Old 02-25-2005, 02:20 PM   #5
edafe
Member
 
Registered: Feb 2005
Posts: 44

Rep: Reputation: 15
Step-by-step instructions on how to use public key authentication with SSH:

http://www.edafe.org/slackware/index...authentication

Regards,
Edafe
 
  


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
Trouble Configuring SSH Server sploit Linux - Networking 8 08-09-2005 10:32 PM
do you need to configuring ssh????? cutejai Debian 1 11-30-2004 08:20 AM
configuring SSH dominant Linux - Security 2 04-01-2004 09:35 AM
Publickey authentication problem with OpenSSH Tularis Linux - Networking 2 03-17-2004 11:50 AM
Having trouble configuring SSH Travis86 Linux - Networking 3 06-19-2003 09:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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