472,121 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,121 software developers and data experts.

paramiko public key

hi
i downloaded paramiko and was trying to create private/pub key pairs
from the docs, i use this method to create private key

import paramiko
k = paramiko.RSAKey.generate(1024)
k.write_private_key_file("test_priv")

How do i generate the public key for this ?
thanks

Dec 12 '06 #1
2 5075
hg
ei***********@yahoo.com wrote:
paramiko
http://www.lag.net/paramiko/docs/

__str__ ?
Dec 12 '06 #2

hg wrote:
ei***********@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

Dec 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by hanjar | last post: by
reply views Thread by dmorilha | last post: by
reply views Thread by Tarun Kapoor | last post: by
reply views Thread by washakie | last post: by
1 post views Thread by Terry Reedy | last post: by
1 post views Thread by sa6113 | last post: by
reply views Thread by sa6113 | last post: by
reply views Thread by sa6113 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.