Putty PPK files

69 views
Skip to first unread message

Lee Pedley

unread,
Jul 16, 2024, 7:58:33 AM7/16/24
to Bots Open Source EDI Translator
Hi,

I am trying to setup a private key file on Bots, and cannot get it to connect.  I am not sure if the private key side needs to be in a certain file format, but it comes up with;

  File "/usr/local/lib/python2.7/site-packages/paramiko/sftp_client.py", line 165, in from_transport window_size=window_size, max_packet_size=max_packet_size File "/usr/local/lib/python2.7/site-packages/paramiko/transport.py", line 924, in open_session timeout=timeout, File "/usr/local/lib/python2.7/site-packages/paramiko/transport.py", line 1051, in open_channel raise e EOFError

Looking at the ppk file which is created by Puttygen, it does include a lot of other lines in here, so not sure if I just need to cut this down to a pure RSA file and remove the comments or what?

Anyone have any ideas?

The file has these lines;

PuTTY-User-Key-File-3: ssh-rsa
Encryption: none
Comment: rsa-key-20240605
Public-Lines: 6

Private-Lines: 14

Private-MAC:

Thanks

Lee

Tom Westrick

unread,
Jul 16, 2024, 9:48:11 AM7/16/24
to Bots Open Source EDI Translator
It looks like you are trying to use it to connect to an SFTP server (so via SSH). In this case, the private key would need to be converted to an OpenSSH format.

Lee Pedley

unread,
Jul 16, 2024, 9:50:31 AM7/16/24
to Bots Open Source EDI Translator
Hi tom,

Thanks this is correct I am using SFTP (SSH).  Will give this a go, thank you so much for coming back to me.  All new to this type of connection.

I will let you know how I get on.

Have a great day.

Lee

Lee Pedley

unread,
Jul 16, 2024, 10:57:53 AM7/16/24
to Bots Open Source EDI Translator
Hi,

I tried that and its still the same error, the timeouts mentioned, appear that it is trying and the session does take a long time each time it runs, so I am guessing it is trying to connect.

I have tried to connect locally from the same machine using the same private key and can do this, so I know this is possible, it's purely down to bots I guess. I have confirmed with them and the address is whitelisted, plus with the ability to log on direct from command line I guess confirms this.

line 924, in open_session timeout=timeout,

Not sure which way to of wit this now.

Thanks for your help

Lee

Eppye Bots

unread,
Jul 16, 2024, 1:35:33 PM7/16/24
to bots...@googlegroups.com
please check out paramiko docs.
this is not a bots problem.
kind regards, Henk-Jan Ebbers


--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/botsmail/29c987ce-752a-4818-8303-d555d71d0a3dn%40googlegroups.com.

Hans

unread,
Sep 3, 2024, 4:16:01 AM9/3/24
to Bots Open Source EDI Translator
Hi Lee,

did you use the export function in puttygen to openSSH?
then in the channel add the location of the openssh key file in  'Private key file:' like "botssys/Privkey.cer"
and add a communicationscript with has the secret 

def privatekey(channeldict):
return channeldict['keyfile'],'RSA','password' #in channel, path to private key; type of key file, password for key file 

this should work.
Op dinsdag 16 juli 2024 om 16:57:53 UTC+2 schreef Lee Pedley:
Reply all
Reply to author
Forward
0 new messages