# SSH into installed image

**URL:** <https://forum.systemcrafters.net/t/ssh-into-installed-image/1139>\
**Category:** Guix\
**Created:** [November 12, 2024, 3:22pm UTC](https://forum.systemcrafters.net/t/ssh-into-installed-image/1139 "2024-11-12T15:22:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moonling](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@moonling](https://forum.systemcrafters.net/u/moonling)\
**Post date:** [November 12, 2024, 3:22pm UTC](https://forum.systemcrafters.net/t/ssh-into-installed-image/1139/1 "2024-11-12T15:22:45Z")

</div>

I’m a bit new to installing a Guix system from scratch and wanted to try it out in a VM first. I created the VM like this:

```auto
> wget https://github.com/SystemCrafters/guix-installer/releases/download/v202411080129/guix-installer-202411080129.iso
> qemu-img create -f qcow2 guix-system.img 100G
> qemu-system-x86_64 -m 1024 -smp 1 -enable-kvm -boot menu=on,order=d -drive file=guix-system.img -nic user,model=virtio-net-pci,hostfwd=tcp::10022-:22 -drive media=cdrom,file=guix-installer-202411080129.iso

```

I went through the graphical installer just fine and can reboot without the `media=cdrom,file...` argument. I can then log in too. I check to see if the ssh daemon is running and it appears to be:

```auto
> sudo herd status sshd
Status of ssh-daemon:
  It is running since 10:05:43 AM (10 minutes ago)
  Running value is ("<input-output: socket 26>" "#<input-output: socket 27>")
  It is enabled.
  Provides (ssh-daemon ssh sshd).
  Requires (pam syslogd loopback networking).
  Will be respawned.

```

However when I try to ssh from my host to the guest I get a failure:

```auto
# Host: 
> ssh -p 10022 admin@localhost

```

On the Guix Guest:

```auto
localhost sshd-session[234]: error: maximum authentication attempts exceeded for admin from 10.2.2.2 port 43042 ssh2 [preauth]

```

I’d imagine this is an issue with ssh daemon configuration since `sshd_config` doesn’t seem to appear in `/etc/ssh`.

So I guess my question is, if this is the case, how do I include that config in the install config in case I want to deploy other Guix VM’s and ssh into them?

Thanks

---

<div class="post-metadata">

**Author:** ![moonling](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@moonling](https://forum.systemcrafters.net/u/moonling)\
**Post date:** [November 12, 2024, 7:50pm UTC](https://forum.systemcrafters.net/t/ssh-into-installed-image/1139/2 "2024-11-12T19:50:01Z")

</div>

Ah, just found the `herd configuration sshd` command. The `MaxAuthTries` is not in the default config there. The default from `man sshd_config` says it is 6. I’m getting this max try error after the first try from a newly installed system.

---

<div class="post-metadata">

**Author:** ![dgr](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/dgr/32/394_2.png) [@dgr](https://forum.systemcrafters.net/u/dgr)\
**Post date:** [November 14, 2024, 8:37am UTC](https://forum.systemcrafters.net/t/ssh-into-installed-image/1139/3 "2024-11-14T08:37:43Z")

</div>

Maybe limit your SSH login to password only as possibly you have some SSH keys in your agent and all the tried keys count as tries.

---

<div class="post-metadata">

**Author:** ![moonling](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@moonling](https://forum.systemcrafters.net/u/moonling)\
**Post date:** [November 16, 2024, 2:16am UTC](https://forum.systemcrafters.net/t/ssh-into-installed-image/1139/4 "2024-11-16T02:16:52Z")

</div>

Gah! That must have been it. Why is that though, especially on a new install?

For anyone wondering I ended up adding this to my config:

```sh
           (service openssh-service-type
                    (openssh-configuration
                     (port-number 22)
                     (use-pam? #t)
                     (public-key-authentication? #f)
                     (log-level 'debug)
                     (extra-content "\
MaxAuthTries 10
                                    ")
                     ))

```
