OT: My ssh authorized_keys doesn't work with nfs/nis

Aryeh Friedman aryeh.friedman at gmail.com
Sat Sep 14 09:57:30 UTC 2019


On Sat, Sep 14, 2019 at 5:54 AM Yasuhiro KIMURA <yasu at utahime.org> wrote:

> From: Aryeh Friedman <aryeh.friedman at gmail.com>
> Subject: Re: OT: My ssh authorized_keys doesn't work with nfs/nis
> Date: Sat, 14 Sep 2019 05:20:48 -0400
>
> > Correct I am using NFS shares for the home dirs
> >
> >> (1) Add new user 'localuser' to /etc/masster.passwd of 'nearby'.
> >> (2) Create home directory of 'localuser' on local file system of
> >>     'nearby'.
> >> (3) Copy id_rsa.pub as ~localuser/.ssh/authorized_keys on 'nearby'
> >> (4) Try 'ssh localuser at nearby'.
> >>
> >>
> > Doesn't ask for password localaccount --> localacccount but localaccount
> > --> NISaccount does ask for a password (I made the authorized keys
> > identical for both accounts).
>
> Then login as root on 'nearby' (or login normal user and do 'su -')
> and check if ~NISaccount/.ssh/authorized_keys can be read by root. If
> root can't read it, probably source of the problem is NFS
> configuration.
>
>
 No problem:

aryehl at timeless:/home/aryehl% sudo su -
root at timeless:~ # more ~aryeh/.ssh/authorized_keys
ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQDK34BrNQxov5xlGQmTp36LtKgU87NkDHFVrjXWcewp9b3E/53LQCj5ijp/7OpKBZRvF2K6D8ozsZburvJFds04WGTBaUHaL3l0duggV7VFW548PQQzUjCsV0ttXgQaCtEopQY5cMG8jNPWu18UtETBEd/R/bv0WTsUmRYCcE/34X0d1PSHOqmuQ1S3F520Ic7ZuaYXHhgENeGHNOQgEE1GpKZ9Q0bDcE6XElM3RQnSTnT+Y4fHeRnwLxUvICrIClvOjE+7RFoVJQ1z1NhrFa19ezpCbdHII2HavWPvfmgYol18PlQhe2WSVZdxzSu5gbQU6m+0cE8STBfopYhR07Gd
aryeh at timeless
ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQDR0l967ARbPtZx8riG4dtbJ3VNzP51t+LeE+HdsSsIAAv9yc12yjfXnpA+h9WmI208WE1tgfY/HE9PVC+rFZlu6doR94PUS3+AinhwRRGiUjinLGneyCfzF2g2D5BXlTWHbgA8Z/66UmOfYrHYIrH506KS1mde9hnX8qoDvj5pEU4yOlCz/hWjHSMg8V8GETImnKisPesOikYtb2k8VtEucv03Hb4YfADZsEA8d0p5dFY0uEAuqB9Fp4BZhbryIuCLz+OiMLZVo58vmMqR/n7yTGnKLI5qKTVpOS0HXfc9+EwFW94UsLbLhjk4se/fC/CTXmEujcksFQryyB4PHG5F
aryehl at neomarx
root at timeless:~ # ls -l ~aryeh/.ssh/authorized_keys
-rw-------  1 aryeh  aryeh  792 Sep 14 05:02
/home/aryeh/.ssh/authorized_keys
-- 
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org


More information about the freebsd-questions mailing list