ssh - 如何为一台特定主机禁用 ProxyCommand?
问题描述
使用 OpenSSH,我设置了我/etc/ssh/ssh_config
的ProxyCommand
所有 SSH 连接都通过该代理。
/etc/ssh/ssh_config
:
Host *
ProxyCommand nc -X connect -x localhost:8111 %h %p
但我想禁用一个特定 SSH 主机的代理。
我已将以下内容添加到我的~/.ssh/config
:
Host ssh.example.org
HostName ssh.example.org
ProxyCommand ""
我应该放什么,ProxyCommand
这样它就不会只为该特定主机使用代理,但默认仍然是通过代理进行 SSH 连接?
解决方案
解决方案是ProxyCommand none
用于应该在代理之外的主机!
Host ssh.example.org
HostName ssh.example.org
ProxyCommand none
推荐阅读
- xml - XamDataGrid 未从 XML 填充
- sql - SQL Server 视图 | 内联视图扩展指南
- python - 将字典转换为值/元组列表
- r - 先知regressor_coefficients 不工作?
- laravel - 防止laravel 8中vuetify组件底部的长空白空间
- c# - 在不同的预定坐标(存储在某种数组或列表中)实例化预制件的最佳方法是什么?
- google-sheets - 在 Google 表格中按天计算时间以制表可用性
- javascript - 如何使用 onPress 按钮在 React Native 中放大/缩小?
- node.js - EISDIR:对目录的非法操作,在尝试使用 PKG 编译时读取
- javascript - 根据状态变量运行 useEffect 钩子的正确方法是什么?