Koozali.org: home of the SME Server

Ssh not reading authorized_keys for admin

Offline oitdmser

  • *
  • 7
  • +0/-0
Ssh not reading authorized_keys for admin
« on: May 07, 2010, 01:50:16 PM »
I'm running SME 7.4 with remote access enabled, passwords disabled.

I successfully setup root with my authorized_keys file and can login remotely. I can't get ssh to read the authorized_keys for admin though. I'm using the EXACT same file for both. I copied the authorized_keys from /root/.ssh/ to /home/e-smith/files/users/admin/.ssh/
Then ran:

chown admin:admin authorized_keys
and
chmod 600 authorized_keys

I also double-checked that permissions were 700 on .ssh with owner/group of admin.

Every time I try to login via ssh to admin it errors out: access denied (publicKey), the same error as though there was no authorized_keys file at all.

There are no entries for admin in the ssh logfile.

Any thoughts?

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Ssh not reading authorized_keys for admin
« Reply #1 on: May 07, 2010, 03:55:05 PM »
Hi.

The home directory of the admin user is not /home/e-smith/files/users/admin, but /home/e-smith, so you have to put the authorized_keys file in /home/e-smith/.ssh/


Regards, Daniel
C'est la fin du monde !!! :lol:

Offline oitdmser

  • *
  • 7
  • +0/-0
Re: Ssh not reading authorized_keys for admin
« Reply #2 on: May 07, 2010, 05:10:42 PM »
Great, that worked. Thanks!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Ssh not reading authorized_keys for admin
« Reply #3 on: May 07, 2010, 06:53:55 PM »
As a future hint, just use ~admin/.ssh/xxxx.