Fixes up some runtime errors in check_ssh()