fixed harden ssh function