Prevent errors if ssh-keygen failed ( Close #512 )

This closed issue #512