help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Connection refused to Guix-hosted SSH


From: address@hidden
Subject: Connection refused to Guix-hosted SSH
Date: Wed, 12 Oct 2022 22:22:11 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]