paramiko public key

eight02645999 at yahoo.com eight02645999 at yahoo.com
Wed Dec 13 06:43:18 EST 2006


hg wrote:
> eight02645999 at yahoo.com wrote:
>
> > paramiko
> http://www.lag.net/paramiko/docs/
>
> __str__ ?

hi
thanks for the tip
i done up a function to generate priv/pub key pairs like this

def keygen(bits,fil,password=None):
        k = paramiko.RSAKey.generate(bits)
        k.write_private_key_file(fil, password)
        pk = paramiko.RSAKey(filename=fil)
        o = open(pubk ,"w").write(pk.__str__())


Is this the correct way to do it ?
thanks




More information about the Python-list mailing list