I'm working on a way to decentralise our SSH keys. The goal is to give each developer/admin/system manager a single SSH key.
This SSH key is added to the authorized_keys file on the bastion server. Now I have the command below that works perfectly when running as a terminal command:
ssh -t email@example.com ssh -i /home/bastion/.ssh/id_rsa target.domain.tld
Now I'm trying to convert this command into an
~/.ssh/config entry. But after many attempts, none have worked.
I have tried using the block below, but with this the target server is using the admin's SSH keys which of course doesn't succeed.
Host *.domain.tld !bastion.domain.tld ProxyJump firstname.lastname@example.org
I've also tried using nc, but this is giving me the same result.
Host *.domain.tld !bastion.domain.tld IdentityFile /home/bastion/.ssh/id_rsa ProxyCommand ssh email@example.com nc %h %p
What am I doing wrong here?