
我正在為我們的幾個開發人員設置跳轉伺服器/堡壘主機,並想知道是否可以config
在堡壘最終伺服器解析。
例如我們有
- 開發商
- 堡壘
- 客戶
目前,我在開發人員中有以下內容.ssh/config
Host bastion
HostName bastion-address.com
User developer
Host client
User client-user
HostName client-ip
ProxyJump bastion
然而,如果我可以在堡壘上設定客戶端用戶和 IP,那就太好了。這樣,開發人員不需要知道詳細信息,只需知道Host
要連接的名稱即可。
因此,可以想像在開發人員筆記型電腦上出現類似以下內容:
Host bastion
HostName bastion-address.com
User developer
Host client-server
HostName client-name
ProxyJump bastion
然後是堡壘上的:
Host client-name
User client-user
HostName client-ip
希望這是有道理的。
答案1
使用 DNS。
使用相關 IP 為 bastion.example.net、client.example.net 等建立 AAAA 記錄。
刪除 ssh_config 中的 IP 位址。