From owner-freebsd-questions@freebsd.org Sat Sep 14 13:24:36 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCE43F4881 for ; Sat, 14 Sep 2019 13:24:36 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46VtX40wzJz3y04 for ; Sat, 14 Sep 2019 13:24:35 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-io1-xd36.google.com with SMTP id n197so68833479iod.9 for ; Sat, 14 Sep 2019 06:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FgVD3bWuF1rTcHI7OzT2ihuYl3SOV6SRBu7A5mPfuZQ=; b=K4Y/PcGWfLxvH/AojKlk49Tl44blMvUmQC7h9ewTkshRo/BwYJUt3KKR/bwfDP1mJ2 tZsfRnA+4TqUq2fUQwMuftTl/rTIMN/AQYjDFZxn+QB71Nd1bO30FRsyC26qd/kVyaJL jzw1hfKcWThHbQr/zpyQ9+rQEnjh9zqN6G8NJ5uJq3GgHF+r0Q7bwOT8UFs9SZ4Qyc1e wpGT3sgSNV8w65NFqtfRf6BJo4IQcMYZp8OgGHXGPCbLzoSitGou51mEfln8EOcZzrdJ FGniZ6RxZ6BRW2ECtSuLj44SYqCsrcF9EFLtpBH+ifXvV5oKIkx8EyEvq2cqaMO7G56L +c8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FgVD3bWuF1rTcHI7OzT2ihuYl3SOV6SRBu7A5mPfuZQ=; b=Clan5PDCPccVXboDwQAlAe5erDyG/fVDio2L+31CksO9XQHTd8wAQruqyPUKFOahdw 3HE6wP9L/2pw7naBL3uDwnSn2sZwlRBkDN65kBbN2vP2HTiSsr5L2UFO1TrL99GinSgH OpbUzFNR5ag/Kt8nvT9PWNj/YQ1rFtNhVysSL+cDM/ZOajS2AOlwZ3i+RqVenDW5okKs hpXE1A7K1ilUCGv5kvzy8Q/+UBU2u3nIAiXSNCRZcuOiqCMVvu4tEhaN3O+cnP2m3UTf dz3nMmV6Z+Y+6lczdC81COI/gmvCdwaI1m/yFdGFxqE3HowPfHsso7PeGHQNZqympqmW ezaw== X-Gm-Message-State: APjAAAX5mGt9s9cFXyxajUMC4c4EpD3F3NvdtEsTI21TIqU8nkCWmVwd 1c4KR/bG+p3T+UTCXztClRdMbqk2YmuPtz/Xkjk= X-Google-Smtp-Source: APXvYqwFxUFPYpGubNNA2uH6bo6/KCxBSvJvSbPmV1sov+mFeB7kZmXzs8c0c3vJHvt3D5ztTRi73OPrEX+OmAFIg9c= X-Received: by 2002:a5d:9a01:: with SMTP id s1mr6144015iol.255.1568467473839; Sat, 14 Sep 2019 06:24:33 -0700 (PDT) MIME-Version: 1.0 References: <99038e82-9643-cbe8-63d7-e3a04ada43b5@gmail.com> In-Reply-To: <99038e82-9643-cbe8-63d7-e3a04ada43b5@gmail.com> From: Aryeh Friedman Date: Sat, 14 Sep 2019 09:24:22 -0400 Message-ID: Subject: Re: OT: My ssh authorized_keys doesn't work with nfs/nis To: MJ Cc: FreeBSD Mailing List X-Rspamd-Queue-Id: 46VtX40wzJz3y04 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=K4Y/PcGW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::d36 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-5.63), ipnet: 2607:f8b0::/32(-2.70), asn: 15169(-2.24), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[6.3.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 13:24:36 -0000 Problem solved it turned out to be really simple the home dir was 777 when the widest ssh wants it is 755 (all the permissions I where look at before where the .ssh dir not the home dir) On Sat, Sep 14, 2019 at 9:22 AM MJ wrote: > > > On 14/09/2019 5:39 pm, Aryeh Friedman wrote: > > My ~/.ssh/authorized_keys files works fine on a machine that is not in my > > NIS domain but when I copy my id_rsa.pub (which is what I did to create > the > > non-NIS authorized_keys) to my NIS account and give it the same > permissions > > as the working machine it insists on asking for a password. > > > > ssh faraway (non-NIS machine) > > does not ask for a password > > but > > ssh nearby (NIS machine) does > > > > Both have identical authorized keys and both (and their parent dirs) are > > set to 644. Both machines are FreeBSD 11 and the machine doing the ssh > > call is FreeBSD 12 > > > > Well in desperation I guess you could: > > Nuke the dud server's authorized_keys > Use "ssh-copy-id -i /your/path/to/key aryeh@nearby" to copy your pub key > to the dud server. > Test with "ssh -i /your/path/to/key -vv aryeh@nearby" > > Cheers > Mark. > -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org