Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing ssh-keyscan on Alpine linux?

Tags:

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.

like image 724
FuzzyAmi Avatar asked May 29 '16 13:05

FuzzyAmi


People also ask

Does Alpine come with ssh?

OpenSSH defines sshd as the daemon, and ssh as the client program. The openssh package provides OpenSSH on Alpine Linux.

What does ssh Keyscan do?

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.

How do I install OpenSSH on Alpine Linux?

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.

How to install alpine on Linux?

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.

Should I enable password-based root login via SSH on Alpine Linux?

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.

How to install and configure SSH on Arch Linux?

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.


Video Answer


1 Answers

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

apk update && apk add openssh 

or alternatively:

apk add -qU openssh 
like image 115
FuzzyAmi Avatar answered Sep 19 '22 16:09

FuzzyAmi