Allow configuation of SSH parameters
This has recently been added to my wish list so I thought I would create an actual issue instead of leaving it as a TODO in source code.
https://github.com/zhaofengli/colmena/blob/429a0f5aa1d1bac06234e2f0c02d5b63a850d940/src/nix/host/ssh.rs#L264
Is this really useful? Beyond StrictHostKeyChecking and BatchMode (and User until #91 is merged), the rest already can be configured with local ssh configuration e.g. ~/.ssh/config
Yes. Currently we run colmena with a very minor patch to add ProxyJump to the ssh options. I would really appreciate this feature.
For me too. For example for ssh over ssm it would be great if I don't have to edit the ~/.ssh/config everything I run terranix/terraform.
A ssh command like this would be necessary to use ssh over ssm:
ssh -o ProxyCommand="sh -c \"aws ssm start-session --profile ASDFASDF --region us-east-1 --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'\""
I worked around this by adding a provisioner to servers i deploy via terraform:
provisioner = [
{
local-exec = {
# TF interpolation only works inline
command = ''
cat << 'EOF' > ''${path.module}/.ssh_config
${builtins.concatStringsSep "\n" (map (name: ''
Host deploy-${name}
HostName ''${hcloud_server.${name}.ipv4_address}
'')
nodeNames)}
EOF
'';
};
}
provisioners.bootstrapHetzner
];
Then added SSH_CONFIG_FILE=.ssh_config to the dev shell and things work pretty nicely. This way I don't have to hardcode the deployment IPs in the flake itself.