LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-17-2005, 03:26 PM   #1
rajah9
LQ Newbie
 
Registered: Aug 2005
Location: Raleigh, NC
Distribution: Fedora Core 4
Posts: 3

Rep: Reputation: 0
ssh - No supported authentication methods


I would like to ssh from a Win XP client (Pagent + PuTTY) to a Linux Fedora Core 4 server, running sshd.

I get a PuTTY terminal and a log in prompt. After trying to log in as root, the PuTTY log says:

Event Log: Key refused
Event Log: No supported authentications offered. Disconnecting

On the Windows client side, I generated a key pair using PuttyGen. I kept the private key on the Windows side and copied the public key to the FC4 server. The first time I use Pagent in the morning, I add the rsa key.

On the server, I placed the corresponding public key in ~/.ssh/authorized_key2. Now the things I've changed in /etc/ssh/sshd_config are:

Code:
 AllowUsers *
 Port 22
 Protocol 2
 HostKey /etc/ssh/ssh_host_rsa_key
 RSAAuthentication yes
 PubkeyAuthentication yes
 AuthorizedKeysFile .ssh/authorized_keys2
 RhostsRSAAuthentication yes
 PasswordAuthentication no
 ChallengeResponseAuthentication no
 UsePAM no
Why is the ssh daemon refusing the key? How should I fix it? Thanks.
 
Old 08-17-2005, 04:03 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
You will need another couple of lines..

UsePrivilegeSeparation yes
PermitRootLogin yes
and change this line..
AuthorizedKeysFile %h/.ssh/authorized_keys2
 
Old 08-18-2005, 03:57 PM   #3
rajah9
LQ Newbie
 
Registered: Aug 2005
Location: Raleigh, NC
Distribution: Fedora Core 4
Posts: 3

Original Poster
Rep: Reputation: 0
Peter,

Thanks for your reply. After your three line changes in sshd_config, PuTTY is lodging the same complaint. Is there some log file that would help trace the problem?
 
Old 08-19-2005, 05:53 AM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Start with the log files on the FC4 server..
Also restart the sshd daemon with extra debug options..
see man sshd for options

You may have something simple like the authorized_keys file has too many permissions..
It should be 600, only root readable/writeable..
 
Old 08-19-2005, 01:59 PM   #5
rajah9
LQ Newbie
 
Registered: Aug 2005
Location: Raleigh, NC
Distribution: Fedora Core 4
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for setting me on the right track.

In order to turn debug on, I had to distinguish between the /etc/rc.d/init.d/sshd script, which does not understand options, from the /usr/sbin/sshd binary, which does. I restarted the script with /usr/sbin/sshd -d -d -d -D. Yes, it looks like I'm stuttering, but you can add up to three -d options to increase the level of debugging. The -D keeps a daemon from spawning, so you can see the error messages in the terminal.

This helped me see that the public key that was generated from PuTTYgen did not sit well in authorized_keys2.

I generated new keys on the Linux server with

Code:
ssh-keygen -t dsa
chmod 600 $HOME/.ssh/id_dsa
cp $HOME/.ssh/id_dsa $HOME/.ssh/authorized_keys2
Then I copied the private key to the Windows client, imported it into PuTTYgen, and added it as a key.

After this point, I could successfully ssh from the client to the server.

Thanks for your help.
 
  


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
SSHD: No further authentication methods. URGENT ciaoci Linux - Security 4 10-08-2005 11:31 AM
Samba Authentication Methods garullon245136 Linux - Newbie 2 08-07-2005 01:20 PM
Samba Authentication Methods garullon245136 Linux - Networking 2 07-12-2005 06:31 PM
SSH authentication blmack44 Linux - Security 1 12-31-2004 02:13 PM
SSH Authentication Help kalikoder Linux - Networking 2 07-16-2003 02:10 PM

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

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