rewrite ssh struckture