ssh-keyscan not found in Dockerfile

You would need to install ssh first.

RUN  apt-get -yq update && \
     apt-get -yqq install ssh

Then, the various ssh commands, including ssh-keyscan, would be available.

That is what I did in my sshd image Dockerfile.
I used it to add localhost to my .ssh/known_hosts in order to make some test locally on the sshd server.

As commented below by pjotr-dolphin:

If you are only after ssh-keyscan, openssh-client has smaller footprint than ssh package.

Actually, package openssh-clients for RedHat/CentOS, as commented by Oleg Neumyvakin

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)