After having created an Alpine Linux vagrant box due to another issue
during my Artix Linux packer installment, that I have solved,
I recently discovered that I can't easily use Alpine Linux
to install Artix Linux, so I'm back again at creating an Artix Linux vagrant box.
https://forum.artixlinux.org/index.php/topic,5457.msg34629.html
And yet again, I like to use dinit, and yet again, I'm back at the same issue.
Packer can't make the SSH handshake required after the scripted installment.
packer_msg "Enable ssh access manually for box"
/usr/bin/artix-chroot /mnt ln -sf /etc/dinit.d/sshd /etc/dinit.d/boot.d/
/usr/bin/install --owner=root --group=root --mode=644 /etc/dinit.d/sshd /mnt/etc/dinit.d/sshd
/usr/bin/install --owner=root --group=root --mode=644 -D -t /mnt/etc/dinit.d/scripts /etc/dinit.d/scripts/sshd
packer_msg "Creating ssh access for artix_user"
/usr/bin/install --directory --owner=artix --group=artix --mode=0700 /mnt/artix/.ssh
/usr/bin/install --owner=artix --group=artix --mode=0600 /home/artix/.ssh/authorized_keys /mnt/artix/.ssh/authorized_keys
During the installation, I have manually created three sshd files.
/etc/dinit.d/sshd
type = process
command = /etc/dinit.d/scripts/sshd
smooth-recovery = true
waits-for = loginready
/etc/dinit.d/scrpts/sshd
#!/bin/sh
/usr/bin/ssh-keygen -A
exec /usr/bin/sshd -D
I have checked permissions as well
*ls -lha /etc/dinit.d/*
drwxr-xr-x 2 root root 4.0K Apr 19 07:15 .
drwxr-xr-x 7 root root 4.0K Apr 19 07:15 ..
-rwxr-xr-x 1 root root 55 Apr 19 07:15 sshd
*ls -lha individual files*
-rwxr-xr-x 1 root root 55 Apr 19 07:15 /etc/dinit.d/scripts/sshd
-rw-r--r-- 1 root root 122 Apr 19 07:15 /etc/dinit.d/sshd
lrwxrwxrwx 1 root root 17 Apr 19 07:15 /etc/dinit.d/boot.d/sshd -> /etc/dinit.d/sshd