Installing ssh-keyscan on Alpine linux? Installing ssh-keyscan on Alpine linux? docker docker

Installing ssh-keyscan on Alpine linux?


This took way too long to find out as its not documented anywhere:

apk update && apk add openssh

or alternatively:

apk add -qU openssh


This would do the job:

RUN apk add --no-cache openssh-client \ && ssh-keyscan github.com > ~/.ssh/known_hosts

You can find the content of an Alpine linux package on this website:https://pkgs.alpinelinux.org/contents?branch=edge&name=openssh-client&arch=x86&repo=main


The command you're looking for is actually ssh-keyscan and you can easily find it using pkgs.alpinelinux.org/contents.