16
3
I would like to use the -N flag in my ssh config file, but I'm not sure how to do this?
Is it possible?
-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?>
Answered here https://unix.stackexchange.com/a/417373/69080. Try RemoteCommand cat
– Joshua Huber – 2018-05-24T13:53:41.123Sounds like a case of the XY problem. What exactly do you want to do?
– terdon – 2012-12-13T16:02:26.643@terdon I am trying to pass the -N flag to ssh for a gitolite server my work has that appears to be slow during push/pull. I was told this will stop ssh from executing a shell on startup and loading the environment and stuff which is contributing to the lag I'm experiencing. – veilig – 2012-12-13T16:37:08.100
Why don't you just run
ssh -N
, why do you need to set this as a config parameter? – terdon – 2012-12-13T16:43:42.900