Instead of
Host host1
HostName host1.namespace.com
ForwardAgent yes
Port 1234
User judith
IdentityFile /Path/to/file
Host host2
HostName host2.namespace.com
ForwardAgent yes
Port 1234
User judith
IdentityFile /Path/to/file
Host host3
HostName host3.namespace.com
ForwardAgent yes
Port 1234
User judith
IdentityFile /Path/to/file
You can just add one entry and work with a placeholder:
Host host1 host2 host3
HostName %h.namespace.com
ForwardAgent yes
Port 1234
User judith
IdentityFile /Path/to/file
There are even more placeholders available, see man ssh_config
!
Posted by Judith Roth to Judith's Dev Notes (2022-09-19 16:08)