paramiko public key

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eight02645999@yahoo.com

    #1

    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

  • hg

    #2
    Re: paramiko public key

    eight02645999@y ahoo.com wrote:
    paramiko


    __str__ ?


    Comment

    • eight02645999@yahoo.com

      #3
      Re: paramiko public key


      hg wrote: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

      Comment

      Working...