Use ssh-keypair for key generation

Remove duplicated code. Required for strider to work on windows.

https://github.com/Strider-CD/strider/issues/326