如何使的.ssh/config文件中主机名配置

问题描述:

我试图建立~/.ssh/config文件,并想使主机配置如何使的.ssh/config文件中主机名配置

ssh pe1-cl1-bo1 should resolve to perf1-client1.app.bo1.host.in 
ssh pe1-c2-bo3 should resolve to perf1-client2.app.bo3.host.in 

i.e 
pe -> expands to perf 
cl -> expands to client 
bo -> remains as it s 

我只是想在我的〜/ .ssh/config文件

一个条目
Host $1-$2-$3 
    Hostname $1.$2..$3 

任何人都可以提出一种方法吗?我尝试使用ProxyCommand,但我无法弄清楚如何使用它。

这是不可能在ssh_config。没有任何机制可以做这种替代。但你应该可以写bash函数来为你解析。