Skip to content

Makepad-fr/add-ssh-host-key-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

add-ssh-host-key-action

Add trusted SSH host key entries to ~/.ssh/known_hosts without fetching keys from the network during a workflow run.

This action is useful when a job needs to connect to a deployment server, bastion, or remote Docker host over SSH and you want strict host key verification without repeating shell setup in every workflow.

Why use this action?

  • Keeps SSH host key verification explicit and reviewable.
  • Avoids runtime ssh-keyscan calls inside CI/CD jobs.
  • Adds only missing trusted entries, so repeated runs stay idempotent.

Usage

steps:
  - name: Add deployment host key
    uses: Makepad-fr/add-ssh-host-key-action@v1
    with:
      server_ip_address: ${{ vars.SERVER_IP_ADDRESS }}
      known_host_entry: ${{ secrets.SERVER_SSH_KNOWN_HOST }}

Inputs

Name Required Description
server_ip_address yes Server IP address or hostname used in log messages.
known_host_entry yes One or more trusted known_hosts lines to append when missing.

Security model

  • You provide the exact trusted known_hosts line or lines through workflow inputs, usually from a GitHub secret.
  • The action never contacts the target host to discover keys on its own.
  • Empty or unusable input fails fast instead of weakening SSH verification.

Documentation

About

GitHub Action to add trusted SSH host key entries to known_hosts.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors