3 ms·
Don't ever fix your `ssh_config` by appending stuff to the end of the file. The configuration syntax allows for block constructs without an explicit end marker
by ralphm 11y ago
Don't ever fix your `ssh_config` by appending stuff to the end of the file. The configuration syntax allows for block constructs without an explicit end marker (like `Match` and `Host`). Appending will cause all kinds of sadness.
- gnur 11y agoIt's from the linked page.
- ralphm 11y agoIndeed. The page gives bad advise. If your config has `Host` blocks, like often in people's personal configs, or if you have a `Match` block, the new directive only applies to the last of those blocks in the config file.
- snowwrestler 11y agoSufficient to place it at the top of ~/.ssh/config? Or does it also need a block header of its own, like: Host * UseRoaming no
- skuhn 11y agoI confirmed that it does not need to be placed into a Host block, as long as it is above all of your blocks. For instance: UseRoaming no Host * Blah yes Test with: ssh -v remote.ssh.host.com uptime 2>&1 | grep -i roaming If it returns nothing, the config fix is active. If it isn't active, you'll see 'debug1: Roaming not allowed by server'
- jldugger 11y agoWhich is why they're appending a newline and Host *?
- ralphm 11y agoNote that the example was changed as a result of my initial comment.