[Twisted-Python] Need SSH help
Paul Swartz
z3p at twistedmatrix.com
Wed Mar 2 14:00:32 MST 2005
On Wed, 2005-03-02 at 14:58 +0000, Bad_Bob wrote:
>I am trying to write an encrypted P2P program (cryptic6.sourceforge.net).
>
>I am trying to understand twisted's ssh. Thanks to the helpful people on
>#twisted I have am able to get the twisted client to send messages to the
>twisted server. This works when I use the keys provided in the example.
>However when I try to generate my own keys it always complains that they are
>not password.
>
>This is the code I am using to generate public/private key pairs:
>
>twisted.scripts.ckeygen.generateRSAkey({'bits':1048,'filename':
>os.path.join(os.path.expanduser('~'),'.cryptic6/keys'),'pass':pass)
>
>This is the error I get:
>
>2005/03/02 14:37 UTC [-] Log opened.
>2005/03/02 14:37 UTC [-] Traceback (most recent call last):
>2005/03/02 14:37 UTC [-] File "sshsimpleserver.py", line 97, in ?
>2005/03/02 14:37 UTC [-] class ExampleFactory(factory.SSHFactory):
>2005/03/02 14:37 UTC [-] File "sshsimpleserver.py", line 101, in
>ExampleFactory
>2005/03/02 14:37 UTC [-] privateKeys = {
The problem is on the next line:
'ssh-rsa': keys.getPrivateKeyObject(data=privateKey)
That means that getPrivateKeyObject doesn't expect the key to be
encrypted. If it is, you need to also pass in the passphrase kwarg with
the passphrase.
-p
--
Paul Swartz
(o_ http://z3p.livejournal.com/ _o)
//\ z3p at twistedmatrix.com /\\
V_/_ AIM: z3penguin _\_V->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20050302/7c669cf2/attachment.sig>
More information about the Twisted-Python
mailing list