Fixes to ssh script