[Twisted-Python] Need SSH help

Bad_Bob TheBadBob at gmail.com
Wed Mar 2 07:58:32 MST 2005


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 = {
2005/03/02 14:37 UTC [-]  File 
"/usr/lib/python2.3/site-packages/twisted/conch/ssh/keys.py", line 180, in 
getPrivateKeyObject
2005/03/02 14:37 UTC [-]    return getPrivateKeyObject_openssh(data, 
passphrase)
2005/03/02 14:37 UTC [-]  File 
"/usr/lib/python2.3/site-packages/twisted/conch/ssh/keys.py", line 207, in 
getPrivateKeyObject_openssh
2005/03/02 14:37 UTC [-]    raise BadKeyError, 'encrypted key with no 
passphrase'
2005/03/02 14:37 UTC [-] twisted.conch.ssh.keys.BadKeyError: encrypted key 
with no passphrase

Is there another way I should generate the keys?

Thanks




More information about the Twisted-Python mailing list