WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Public key/authorized_keys: Server refused our key  (Read 3442 times)

Offline Adam

  • Full Member
  • ***
  • Posts: 121
Public key/authorized_keys: Server refused our key
« on: August 18, 2013, 05:19:25 AM »
I was wondering is there anyone experienced this kind of issue before? I was getting this error when configuring authorized_keys in /home/tc/.ssh/authorized_keys

Configuration steps are as follows:
1.   Generate public/private key pair using PuTTY Key Generator
2.   Copy generated public key to /home/tc/.ssh/authorized_keys

Quote
tc@Core1:/$ ls -la /home/tc/ | grep ssh
drwxr-sr-x    2 tc       staff           60 Aug 17 17:25 .ssh/
tc@Core1:/$

tc@Core1:/$ ls -la /home/tc/.ssh/ | grep key
-rw-r--r--    1 tc       staff          226 Aug 17 17:25 authorized_keys
tc@Core1:/$

3.   Configured putty client with the private key
4.   Trying to login but getting the following error message. “Server refused our key”

Quote
Using username "tc".
Server refused our key
tc@192.168.10.11's password:

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Public key/authorized_keys: Server refused our key
« Reply #1 on: August 18, 2013, 10:07:44 AM »
Putty keys are not directly usable by Linux sshd.  Please read your putty documentation.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Public key/authorized_keys: Server refused our key
« Reply #2 on: August 18, 2013, 10:57:49 AM »
Also your permissions are way more promiscuous than necessary.
Try:
Code: [Select]
chmod g-rsx,o-rx /home/tc/.ssh
chmod g-r,o-r /home/tc/.ssh/authorized_keys
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)