updated ssh key generation logic.