unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Connection refused to Guix-hosted SSH
@ 2022-10-12 20:22 dabbede
  2022-10-13  5:30 ` Oleg Pykhalov
  2022-10-13 21:04 ` Felix Lechner via
  0 siblings, 2 replies; 12+ messages in thread
From: dabbede @ 2022-10-12 20:22 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-10-19 19:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 20:22 Connection refused to Guix-hosted SSH dabbede
2022-10-13  5:30 ` 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

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).