【发布时间】:2017-01-23 20:15:05
【问题描述】:
我已经编写了一个 ssh 配置文件,它指定了一个典型的跳转服务器设置:
Host host1
HostName 11.11.11.11
User useroo
IdentityFile some/key/file
Host host2
HostName 192.11.11.10
User useroo
IdentityFile some/other/key
ProxyCommand ssh -W %h:%p host1
当我将其保存为~/.ssh/config 时,我可以成功连接ssh host2。但是,如果我将配置保存为xy_conf,调用ssh -F xy_conf host2 会导致错误提示
ssh: Could not resolve hostname host1: Name or service not known
ssh_exchange_identification: Connection closed by remote host
这是预期的行为吗?我还能如何临时设置此配置?我不想设置为~/.ssh/config。
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8,OpenSSL 1.0.1f 2014 年 1 月 6 日
【问题讨论】:
标签: ssh ubuntu-14.04 openssh