ssh error checking/more key generation fixes