In order to successfully clone a private repository into an Alpine-based docker, I needed to run the following command: ssh-keyscan github.com >> ~/.ssh/known_hosts
.
But since ssh-keyscan isn't part of Alpine linux (by default), I have to install it first with apk. The problem is: I dont know how - and I can't find it anywhere on Google.
OpenSSH defines sshd as the daemon, and ssh as the client program. The openssh package provides OpenSSH on Alpine Linux.
ssh-keyscan is a command for gathering the public host keys for a number of hosts. It aids in building and verifying ssh_known_hosts files. ssh-keyscan provides a minimal interface suitable for use by shell and Perl scripts.
To install both the OpenSSH server and client and associated packages in Alpine Linux, run the command: To confirm that the OpenSSH server is installed, run the command: From the output, we can see that OpenSSH is installed.
Boot from the CD or USB drive, login as root with no password, and voilà! Enjoy Alpine Linux! Now Alpine are complete running from the media source, you can install it by running the setup-alpine command.
Note: Be aware that enabling root access via SSH has security implications! On Alpine Linux, root SSH access using passwords is disabled by default. The following tutorial shows you how to enable password-based root login via SSH when using openssh.
Then you can install the OpenSSH service on Arch Linux through the packman commands. You can start or stop any SSH service, check the SSH status, and disable the SSH service on Arch Linux using the systemctl terminal command. To configure the SSH service script on Arch Linux, you need to open the configuration file from the /etc/ssh/ directory. 4.
This took way too long to find out as its not documented anywhere:
apk update && apk add openssh
or alternatively:
apk add -qU openssh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With