liveBook · Manning

Strict host key checking

As explained in Road to Kubernetes

Strict host key checking is an SSH verification mode that requires a remote host key to be trusted before connection.

Strict host key checking controls whether SSH requires a remote host key to be trusted before connecting. In a GitHub Actions workflow, disabling it avoids an interactive authenticity prompt that automated jobs cannot answer. section 4.1.5

Configure an automated SSH connection

Create the SSH configuration before connecting to the server: echo "StrictHostKeyChecking=no" > ~/.ssh/config. The workflow can then use ssh to update packages and install NGINX without waiting for user input.

echo "${{ secrets.AKAMAI_INSTANCE_IP_ADDRESS }} $(ssh-keyscan -H ${secrets.AKAMAI_INSTANCE_IP_ADDRESS})" > ~/.ssh/known_hosts 

Compare disabling the prompt with adding the server’s hashed host key to ~/.ssh/known_hosts before the connection. section 4.1.5

How Road to Kubernetes covers it

How deep it goes
Explains the interactive prompt and shows one configuration command, while deferring deeper SSH host-key mechanics.
Examples
Uses a GitHub Actions YAML workflow that configures SSH and installs NGINX on a remote Ubuntu server.
What it assumes
Assumes a remote server, SSH access, and GitHub Actions secrets for the private key and server address.
What you can do after
Operate automated SSH deployments by configuring host-key handling before running remote commands.
How it connects
Connects SSH host-key verification with GitHub Actions, known_hosts, ssh-keyscan, and remote-server deployment.

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.