all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fabio Natali <me@fabionatali.com>
To: guix-devel@gnu.org
Subject: SSH key management for Guix cloud machines
Date: Fri, 19 Jan 2024 13:15:44 +0000	[thread overview]
Message-ID: <87o7dhzcov.fsf@fabionatali.com> (raw)

Hi All,

I wanted to ask what the best practice is (or what people usually do)
when it comes to SSH key management for Guix systems deployed in the
cloud.

In a nutshell, consider a cloud server that's been instantiated out of a
Guix system image. Suppose that the image comes with a predefinded
(passwordless) user and an authorised SSH key for remote access.

On first access, the user is asked to verify and accept the server's SSH
fingerprint, and rightfully so to protect against MITM attacks.

Is there any mechanism that would allow to access the server without
having to trust-on-first-use the server's fingerprint?

In other words, once the server SSH key has been generated, is there any
standard/common way to have the fingerprint published (or somehow
"phoned home")?

In the context of cloud-init, I think this is achieved via the Phone
Home module⁰. I believe Terraform and other orchestration tools also
provide their own solution to this.

Am I missing anything macroscopic here? Is there any similar SSH
phone-home service under Guix? If not, would there be interest around
such a service or potentially to have this functionality as part of the
SSH service?

A cheap (but convoluted) option would be to have the SSH fingerprint
saved in /etc/issue. Some cloud providers allow the possibility to
connect to the machine via a web console. A user would be able to use
the web console to retrieve the key. A bit of a hack, to be honest.

Any idea or comment welcome.

Thanks, cheers,

Fabio.


- 0 https://cloudinit.readthedocs.io/en/latest/reference/modules.html#phone-home


-- 
Fabio Natali
https://fabionatali.com


             reply	other threads:[~2024-01-19 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 13:15 Fabio Natali [this message]
2024-01-19 19:09 ` SSH key management for Guix cloud machines Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-01-19 22:52   ` Fabio Natali
2024-01-21  4:14     ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-01-26 18:07       ` Fabio Natali

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

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

  git send-email \
    --in-reply-to=87o7dhzcov.fsf@fabionatali.com \
    --to=me@fabionatali.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.