Skip to content

Instantly share code, notes, and snippets.

@lcatlett
Last active July 20, 2022 15:52
Show Gist options
  • Save lcatlett/0d8b552db22d5a4f7f7903332b8c9d4c to your computer and use it in GitHub Desktop.
Save lcatlett/0d8b552db22d5a4f7f7903332b8c9d4c to your computer and use it in GitHub Desktop.
Sample ssh config to prevent dropped connections for Drush tasks
# Put this configuration in ~/.ssh/config.
# Note that any of the options available in ssh_config can be used in this file.
# See https://man.openbsd.org/ssh_config for the available options.
#
# These can also be configured on the cli via the -o parameter, and in the drush
# ssh.options configuraton in either drush.yml or the site alias .yml file.
# See https://linuxcommand.org/lc3_man_pages/ssh1.html and
# https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml#L155-L159
Host *
AddKeysToAgent yes
ForwardAgent yes
StrictHostKeyChecking no
Host bastion
Hostname 34.135.86.149
IdentityFile ~/.ssh/id_rsa_bastion
User bastion
Host *.drush.in
StrictHostKeyChecking no
PasswordAuthentication no
ProxyJump bastion
ServerAliveInterval 30
ControlMaster yes
ControlPersist 60m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment