我想在我的ssh配置文件中使用-N标志,但是我不确定如何执行此操作?
可能吗?
-N Do not execute a remote command. This is useful for just for‐
warding ports (protocol version 2 only).
Host foo
HostName foo.bar.com
User baz
<how can I add -N flag here?>
听起来像是XY问题。您到底想做什么?
—
terdon
@terdon我正在尝试将-N标志传递给ssh,以获取我的工作在推/拉期间运行缓慢的gitolite服务器。有人告诉我,这将阻止ssh在启动时执行Shell并加载环境和内容,这加剧了我遇到的延迟。
—
veilig 2012年
为什么不直接运行
—
terdon 2012年
ssh -N,为什么需要将其设置为配置参数?
在这里回答unix.stackexchange.com/a/417373/69080。试试RemoteCommand cat
—
Joshua Huber '18