Fix bug in ssh logging mechanism