unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "dabbede@gmail.com" <dabbede@gmail.com>
To: help-guix@gnu.org
Subject: Connection refused to Guix-hosted SSH
Date: Wed, 12 Oct 2022 22:22:11 +0200	[thread overview]
Message-ID: <CAEwYQ4Q7LLF6JjreN7-ckXBEjZBnCHKfdHXe03RgT=pm_4H+vw@mail.gmail.com> (raw)

Dear all,
I'm starting with Guix and I'm still learning. I've set up a simple
system with no gui, and now I would like to configure OpenSSH daemon
to accept incoming connections for my two users ("root" and "pcp").
Here is my config.scm file. Both "root.pub" and "pcp.pub" are existing
in /etc when I run guix system reconfigure.

(use-modules (gnu))
(use-modules (gnu packages linux))
(use-service-modules desktop networking ssh xorg)

(operating-system
  (kernel linux-libre)
  (locale "en_US.utf8")
  (timezone "Europe/Rome")
  (keyboard-layout (keyboard-layout "it"))
  (host-name "PCP3600")
  (users (cons* (user-account
                  (name "pcp")
                  (comment "Pcp Developer")
                  (group "users")
                  (home-directory "/home/pcp")
                  (supplementary-groups
                    '("wheel" "netdev" "audio" "video")))
                %base-user-accounts))
  (services
    (append
      (list (service static-networking-service-type
              (list (static-networking
                       (addresses (list (network-address (device
"eno1") (value "10.168.214.102/24")))))))
            (service openssh-service-type
                     (openssh-configuration
                        (permit-root-login #t)
                        (password-authentication? #t)
                        (public-key-authentication? #t)
                        (authorized-keys
                          `(("root" ,(local-file "root.pub"))
                            ("pcp" ,(local-file "pcp.pub")))))))
      %base-services))
  (bootloader
    (bootloader-configuration
      (bootloader grub-bootloader)
      (target "/dev/sda")
      (keyboard-layout keyboard-layout)))
  (swap-devices
    (list (uuid "7137662a-60fa-4f0e-b820-916e644d6e84")))
  (file-systems
    (cons* (file-system
             (mount-point "/")
             (device
               (uuid "4fc3b29d-3ef4-4c79-ba8c-8a86fb5fc06c"
                     'ext4))
             (type "ext4"))
           %base-file-systems)))

From another machine I can correctly ping this system at the static
address, but I can't login with private credentials. Actually, I can't
connect even with password, because every time my client ends with
"Network error: Software caused connection abort".

Within guix, if I run "ssh pcp@localhost" I receive a "Connection
reset by 127.0.0.1 port 22" (I don't know if it is supposed to work on
localhost).

I've also tried to manaully add the pub keys in ".ssh/authorized_keys"
for both users, with no luck. What am I missing?!

Thank you for your help


             reply	other threads:[~2022-10-12 20:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 20:22 dabbede [this message]
2022-10-13  5:30 ` Connection refused to Guix-hosted SSH Oleg Pykhalov
2022-10-14  8:27   ` dabbede
2022-10-13 21:04 ` Felix Lechner via
2022-10-14  8:54   ` dabbede
2022-10-14 17:06     ` Felix Lechner via
2022-10-14 20:01       ` dabbede
2022-10-14 20:18         ` Felix Lechner via
2022-10-19 18:54         ` Efraim Flashner
2022-10-19 19:39           ` dabbede
2022-10-15  6:01     ` Oleg Pykhalov
2022-10-16  7:53       ` dabbede

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='CAEwYQ4Q7LLF6JjreN7-ckXBEjZBnCHKfdHXe03RgT=pm_4H+vw@mail.gmail.com' \
    --to=dabbede@gmail.com \
    --cc=help-guix@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.
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).