From owner-freebsd-questions@freebsd.org Sat Sep 14 13:27:25 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 5EAF5F4A62 for ; Sat, 14 Sep 2019 13:27:25 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (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 46VtbJ0FjYz3yJm for ; Sat, 14 Sep 2019 13:27:23 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: by mail-pg1-x535.google.com with SMTP id m29so515256pgc.3 for ; Sat, 14 Sep 2019 06:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=PziMejOo9doIaa/vn8QzMevHtGAkjeF5j+KQMzx4Esc=; b=dodJDPbGBx9YWZtoT+PmtOzvWj95djdXXpt/imyFUoICtpzhjBG3IXEzblUx4xpOV5 5rcvl0E9JhCRj3RphOE64c5GadU5567CtU+3iNH5a+ruhh3B2Os4ia6Ly7HlelwikClK s+asxTmIWtWWOurQkDFqLk5zUL4IchMNrNSFOhPqKUkvI5gwm05Nm4dUky9J9ZGWtAxs A7S4g2TX2LVFS4UdloysvTQ4EvZ1XAfL6r1SRKjv/X7QMLsn5yD7g/ol8xQWnszCv4pf qyhqwFyJYv0/g23mYT4CQEnwJcDZT/WDIM3AQ0GYrMXdzOg9oojGQFh5wp+Ljo7Bdz4h 3n/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=PziMejOo9doIaa/vn8QzMevHtGAkjeF5j+KQMzx4Esc=; b=lGpukSuQFGivDoQNu3bBjJusBriT3mvrqWGgZ+sBJR1c914V9MUTeR5xtqV0Wxvxrc QtV6/jJx7o4fzrJHHSc5SPSv8K5vrTom5fzeAMk8f73UU+++6OZSqcn+Kx7Rjesa619s DMxhtt6q2NxDGzOsiXv2daY8gVFfIqu7tmusQKJmvTftGvB7B6d5+rbGwizFuijsyEMQ glROQxZiSWY1Mm7iLJf4TlzzmJUZP8BEDCsqLfhc/tBobYuj1EiMbk/smMwR+qYsAAIk 6ofREnFqY+a1cpjmn5hD/ePeJBM6HOuRGbkY70LiPJdyS99GQhzEc3s/r8DclLcM5+eE U4Mw== X-Gm-Message-State: APjAAAUT1SR58z52bYszFPRbDcuM21F1Y7Sb41g5nHU8pmJ6hctJRo29 jpKZZpNPX3eusfwtCDjGC3m8NrR3mhM= X-Google-Smtp-Source: APXvYqzEmvGOacyNbev4JryD1v2u9bAPp1CrRUccbXFt8Rpp33Zsnx5dZICwz/lxhf9A98V9B54hdw== X-Received: by 2002:a62:ab04:: with SMTP id p4mr2609167pff.227.1568467642601; Sat, 14 Sep 2019 06:27:22 -0700 (PDT) Received: from [192.168.1.10] (C-59-101-201-178.bur.connect.net.au. [59.101.201.178]) by smtp.gmail.com with ESMTPSA id b5sm54805894pfp.38.2019.09.14.06.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Sep 2019 06:27:22 -0700 (PDT) Subject: Re: OT: My ssh authorized_keys doesn't work with nfs/nis To: Aryeh Friedman Cc: FreeBSD Mailing List References: <99038e82-9643-cbe8-63d7-e3a04ada43b5@gmail.com> From: MJ Message-ID: Date: Sat, 14 Sep 2019 23:26:50 +1000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 46VtbJ0FjYz3yJm X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=dodJDPbG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mafsys1234@gmail.com designates 2607:f8b0:4864:20::535 as permitted sender) smtp.mailfrom=mafsys1234@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; RCVD_COUNT_THREE(0.00)[3]; 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]; RECEIVED_SPAMHAUS_PBL(0.00)[178.201.101.59.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_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]; TAGGED_RCPT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[5.3.5.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]; IP_SCORE(0.00)[ip: (-9.36), ipnet: 2607:f8b0::/32(-2.70), asn: 15169(-2.24), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] 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:27:25 -0000 Well it's great to see that extra debugging information totally missed it. :-P On 14/09/2019 11:24 pm, Aryeh Friedman wrote: > 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. >> >