Joh*_*uer 3 linux ssh command-line shell-script
有什么方法可以查询有效的ssh(客户端)配置吗?
ssh
具体来说:我是否可以确定例如给定主机是否有条目、该主机的设置是什么ProxyJump等User,而不需要实现我自己的配置文件解析?
ProxyJump
User
Joh*_*uer 6
从man 1 ssh:
man 1 ssh
-G 导致ssh在评估后打印其配置Host并Match阻止并退出。
-G
Host
Match
因此,如果指定了,ssh -G some-host | grep "^proxyjump "将返回 的ProxyJump指令。some-host
ssh -G some-host | grep "^proxyjump "
some-host
归档时间:
2 年,2 月 前
查看次数:
113 次
最近记录: