help-guix
[Top][All Lists]
Advanced

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

Re: Connection refused to Guix-hosted SSH


From: Oleg Pykhalov
Subject: Re: Connection refused to Guix-hosted SSH
Date: Thu, 13 Oct 2022 08:30:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Hi,

"dabbede@gmail.com" <dabbede@gmail.com> writes:

[…]

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

[…]

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

Is another machine in the same network 10.168.214.102/24?

A default gateway should be specified if not.

(static-networking
 (routes
   (list (network-route
          (destination "default")
          (gateway "???"))))
 ...)

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

It is supposed.

What does ‘sudo herd status’ show?

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

By default on Guix system that should work as well as specifing keys in
the system configuration file.

Make sure that .ssh directory has 0700 permissions, which is required by
SSH daemon.


Oleg.

Attachment: signature.asc
Description: PGP signature


reply via email to

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