all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: dabbede@gmail.com
Cc: help-guix@gnu.org
Subject: Re: Connection refused to Guix-hosted SSH
Date: Thu, 13 Oct 2022 08:30:27 +0300	[thread overview]
Message-ID: <87mta0xpcc.fsf@gmail.com> (raw)
In-Reply-To: <CAEwYQ4Q7LLF6JjreN7-ckXBEjZBnCHKfdHXe03RgT=pm_4H+vw@mail.gmail.com> (dabbede@gmail.com's message of "Wed, 12 Oct 2022 22:22:11 +0200")

[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2022-10-13  5:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 20:22 Connection refused to Guix-hosted SSH dabbede
2022-10-13  5:30 ` Oleg Pykhalov [this message]
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

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

  git send-email \
    --in-reply-to=87mta0xpcc.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=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.
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.