ssh helper: fix bad detection when running under a container
internal: split 'reconfigure' in two stage (pre, post)