Add safeguard against failed SSH connection