Jump to content

OpenSSH Authentication Problem


Guest Teeps
 Share

Recommended Posts

Hi,

 

I'm trying to get key based authentication to work. I've generated the keys I need (I think), but when I type 'ssh -l mtuma matthewx' to log in to the remote machine it fails.

 

The log on the server says:

Oct 11 16:50:05 MATTHEWX sshd[312]: debug1: Forked child 328.
Oct 11 16:50:05 MATTHEWX sshd[328]: debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
Oct 11 16:50:05 MATTHEWX sshd[328]: debug1: inetd sockets after dupping: 3, 3
Oct 11 16:50:05 MATTHEWX sshd[328]: Connection from ::ffff:192.168.0.111 port 1743
Oct 11 16:50:05 MATTHEWX sshd[328]: debug1: Client protocol version 2.0; client software version OpenSSH_3.9p1
Oct 11 16:50:05 MATTHEWX sshd[328]: debug1: match: OpenSSH_3.9p1 pat OpenSSH*
Oct 11 16:50:05 MATTHEWX sshd[328]: debug1: Enabling compatibility mode for protocol 2.0
Oct 11 16:50:05 MATTHEWX sshd[328]: debug1: Local version string SSH-2.0-OpenSSH_3.9p1
Oct 11 16:50:13 MATTHEWX sshd[328]: debug1: temporarily_use_uid: 501/501 (e=0/0)
Oct 11 16:50:13 MATTHEWX sshd[328]: debug1: trying public key file /root/.ssh/authorized_keys
Oct 11 16:50:13 MATTHEWX sshd[328]: debug1: restore_uid: 0/0
Oct 11 16:50:13 MATTHEWX sshd[328]: debug1: temporarily_use_uid: 501/501 (e=0/0)
Oct 11 16:50:13 MATTHEWX sshd[328]: debug1: trying public key file /root/.ssh/authorized_keys
Oct 11 16:50:13 MATTHEWX sshd[328]: debug1: restore_uid: 0/0
Oct 11 16:50:13 MATTHEWX sshd[328]: debug1: do_cleanup

 

It looks to me as if it's ignoring the keys in my home directory, and trying to use root's keys instead. The sshd_config is set to look in ~/.ssh/authorized_keys, which I think should make it look in /home/mtuma/.ssh/authorized_keys . This exists, and has the correct permissions. :?

 

Any ideas anyone, please?

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

I've sorted it, I had to change a line in the sshd_config from this:

AuthorizedKeysFile      ~/.ssh/authorized_keys

to this:

AuthorizedKeysFile      .ssh/authorized_keys

 

I guess it's assuming the home directory already for some reason.

 

Thanks anyway.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...