LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-28-2005, 01:56 PM   #1
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Rep: Reputation: 18
ssh public key problem


I am trying to get ssh public key authenitcation to work, but I'm always greeted with a password prompt. I did the following:

1.) Created a public/private key pair via
Code:
$ ssh-keygen -b 2048 -t dsa
2.) scp'd the id_dsa.pub file to the remote server and added it to the authorized_keys file via
Code:
$ cat id_dsa.pub >>authorized_keys
3.) added the private key to my ssh-agent via
Code:
$ ssh-add
In the sshd_conf file on the remote machine, PubkeyAuthentication is set to yes, so it should work. Logging in via password authentication also works fine. So what is the poblem?

PS: This is the ssh output with the -vvv option enabled (abridged):
Code:
(...)
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/lo/.ssh/id_dsa (0x8090518)
debug2: key: /home/lo/.ssh/identity ((nil))
debug2: key: /home/lo/.ssh/id_rsa ((nil))
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/lo/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /home/lo/.ssh/identity
debug3: no such identity: /home/lo/.ssh/identity
debug1: Trying private key: /home/lo/.ssh/id_rsa
debug3: no such identity: /home/lo/.ssh/id_rsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
 
Old 12-28-2005, 03:07 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What are the permissions on the server files:
ls -la ~/.ssh

The directory should be 700 and the files 600.
 
Old 12-28-2005, 03:32 PM   #3
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Original Poster
Rep: Reputation: 18
The permissions are right. Could the sshd possibly block publickey access from machines outside its network? The remote server is part of the university network, and I try to login from my home. But blocking publickey access and allowing password authentication would be weird anyway.
 
Old 12-28-2005, 08:18 PM   #4
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Rep: Reputation: 15
from the debug info, it does not try the dsa key that you have generate:
debug1: Trying private key: /home/lo/.ssh/identity
debug3: no such identity: /home/lo/.ssh/identity
debug1: Trying private key: /home/lo/.ssh/id_rsa
debug3: no such identity: /home/lo/.ssh/id_rsa

i think you can create an id_rsa key to see if that work at first
 
  


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 public key authentication teacup Linux - Networking 4 11-27-2011 11:27 PM
DISCUSSION: Public key authentication with ssh david_ross LinuxAnswers Discussion 31 02-02-2011 08:13 AM
ssh public key authentication problem flgal3 Linux - Software 21 02-06-2009 11:15 AM
SSH - Problem with Public Key Authentication HaPagan Linux - Security 5 11-28-2005 11:27 PM
ssh using public key jkmartha Linux - Networking 1 05-04-2005 02:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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