unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Giovanni Biscuolo <g@xelera.eu>
To: Felix Lechner <felix.lechner@lease-up.com>
Cc: guix-devel@gnu.org
Subject: Re: pam_ssh_agent_auth on a Guix System?
Date: Wed, 31 May 2023 09:46:47 +0200	[thread overview]
Message-ID: <87pm6h6izc.fsf@xelera.eu> (raw)
In-Reply-To: <CAFHYt56TofLk1kEkNOP=P=KGrPUb=EGBYfkcEcpt0tAZ6HQY=w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]

Hi Felix,

Felix Lechner <felix.lechner@lease-up.com> writes:

[...]

>> I'd like to execute sudo without having to set and enter a password [1]
>> and that PAM module is needed

well, the above description is misleading :-(

> You could also add a line like this to your /etc/sudoers (but I don't
> recommend it)
>
> user_name ALL=(ALL) NOPASSWD:ALL

actually I don't want to disable authentication, I'd like to:

--8<---------------cut here---------------start------------->8---

permit anyone who has an SSH_AUTH_SOCK that manages the private key
matching a public key in /etc/security/authorized_keys to execute sudo
without having to enter a password. Note that the ssh-agent listening to
SSH_AUTH_SOCK can either be local, or forwarded.

Unlike NOPASSWD, this still requires an authentication, it's just that
the authentication is provided by ssh-agent, and not password entry.

--8<---------------cut here---------------end--------------->8---
(from https://pamsshagentauth.sourceforge.net/)

>> is someone already using such a configuration in a Guix System?
>
> Not quite. I added my public ssh key to root's authorized_keys. It's
> different from what you are looking for but gives you a root prompt
> with 'ssh root@localhost`.

mumble... I wonder if this works with a forwarded ssh-agent (this means
that you don't need your private ssh key on the remote host to do that
ssh)

> I did it because it's required for 'guix deploy'.
>
> Personally, I have not used the SSH agent, but it's an interesting
> avenue. I use Kerberos instead, which is probably the gold standard
> for distributed authentication. You are doing the right thing by
> thinking about your options.

I never used kerberos (I should learn it) but if possible I'd like to
avoid to install and configure extra services; ssh is ubiquitous and
installing and configuring an ssh-agent on the client /maybe/ is easier
than a kerberos client

[...]

Thanks! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

      reply	other threads:[~2023-05-31  7:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 16:58 pam_ssh_agent_auth on a Guix System? Giovanni Biscuolo
2023-05-30 17:34 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-05-31  7:46   ` Giovanni Biscuolo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pm6h6izc.fsf@xelera.eu \
    --to=g@xelera.eu \
    --cc=felix.lechner@lease-up.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).