basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
9.38k stars 357 forks source link

Configurable SSH Identity #866

Open acidtib opened 1 week ago

acidtib commented 1 week ago

This PR introduces SSH options keys_only, keys, and key_data, which gives us the ability to define the SSH key used.

  # Keys Only
  #
  # Set to true to use only private keys from keys and key_data parameters, 
  # even if ssh-agent offers more identities. This option is intended for 
  # situations where ssh-agent offers many different identites or you have 
  # a need to overwrite all identites and force a single one.
  keys_only: false

  # Keys
  #
  # An array of file names of private keys to use for publickey
  # and hostbased authentication
  keys: [ "~/.ssh/id.pem" ]

  # Key Data
  #
  # An array of strings, with each element of the array being
  # a raw private key in PEM format.
  key_data: [ "-----BEGIN OPENSSH PRIVATE KEY-----" ]