Having a .moshrc (equivalent to .ssh/config) file to be able to specify per-host configs
Hi,
I think this would go a long way improving the usability of mosh to be able to have a .ssh/config equivalent.
Unfortunately, ssh complains about unknown directives in .ssh/config so we will need a new file (I also think it's good practice to do so anyway).
The format could be simple (.ssh/config sounds a pretty good example: easy to write, easy to parse).
Useful configs to include: hostname, port, mosh-server, eventually ssh and command (in some weird case). Later: enable/disable OOB data (#423) on a per-host basis.
Some of the configs such as hostname, agent forwarding, X11 forwarding, etc... could actually be extracted from .ssh/config directly.
I think it's much better than aliases because it's seamless and consistent. Plus the fact that mosh already seamlessly use .ssh/config makes it quite irritating to be able to use aliases only for specifying a couple of argument for a given host. If many hosts requires a custom config multiplication of aliases could also clutter the shell. Plus we always have to remember which hosts works out-of-the-box and which needs an alias. All this disappears with a .mosh/config config file.
Security-wise, since it's already done by ssh (and actually allows a much bigger control on the connection since it could change the Hostname we are connecting to, define a ProxyCommand, etc...), If the file is secure, I don't see a very big security issue here.
Source: mobile-shell/mosh