bugzilla-daemon at bugzilla.mindrot.org
2020-Feb-25 09:02 UTC
[Bug 3124] New: Add a token to expand to remote hostname without domain name
https://bugzilla.mindrot.org/show_bug.cgi?id=3124 Bug ID: 3124 Summary: Add a token to expand to remote hostname without domain name Product: Portable OpenSSH Version: 8.2p1 Hardware: amd64 OS: All Status: NEW Severity: enhancement Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org Reporter: mmoya at mmoya.org Add a token (say %H) for expanding the remote hostname *without* the domain name. This feature will be useful to make config more clear when setting up access through a bastion host. Right now, getting the remote hostname (without domain name) can be achieved with a shell hack. Example config: ``` Host *.proj ConnectTimeout 5 IdentityFile ~/.ssh/id_ecdsa-proj Host *.prod.proj ProxyCommand ssh 1.2.3.4 -W $(echo %h | cut -d. -f1):%p Host *.staging.proj ProxyCommand ssh 2.3.4.5 -W $(echo %h | cut -d. -f1):%p ``` compare that to something like: ``` Host *.proj Hostname %H # a hypothetical new token expanding to the host part of the remote hostname ConnectTimeout 5 IdentityFile ~/.ssh/id_ecdsa-proj Host *.prod.proj ProxyJump 1.2.3.4 Host *.staging.proj ProxyJump 2.3.4.5 ``` Thanks -- You are receiving this mail because: You are watching the assignee of the bug.