Suppose I type ssh -M localhost
… ssh does not print any errors and connects successfully after prompting me for my password. Thus I assume that it went into master mode and future connections can piggy-back on this one. But if I try ssh localhost
in another terminal, it prompts for the password again, even though my ssh -M
connection is still running.
Furthermore, if I explicitly specify I a path using ssh -S path-to-ctl.socket -M localhost
then I can find the line that creates the socket when I run ssh
under strace
. But without -S
I see no similar line in the strace output. Similarly, when I use verbose mode with ssh -v
it only mentions creating a master socket if I pass -S
but not if I don’t.
Is it silently ignoring the -M
option instead of providing a sane default path? PuTTY (and plink) don’t require this level of micromanagement, so I’d be surprised if ssh does … the docs never say that -S
is required, but they never say it is optional either, and they seem to give the impression that it is required… would be nice to know for sure one way or another.
The following is technically not part of my question but just idle curiosity:
If it is required, I’d be curious to know if there is a principled reason for not having this feature, or more of “it’s not too important for this to have a default value”. I’d also be curious to know if there is any widespread convention about things like what directories such files are typically put in, or does everyone just make up their own ad-hoc paths.