question - WeOnlyDo Discussion board

question (wodFtpDLX / wodFtpDLX.NET)

by ScotS, Monday, March 21, 2016, 18:11 (1274 days ago)

i have a key created from puttygen.
i exported the openssh private key.
i use an ssh key in my program.
Can I simply read the key that was saved to the file?

------------------------------------------------------------

ole_cer.ConnectToNewObject("WeOnlyDo.Certificate.1")
ole_cer.loadkey(f_path)

ole_ftp.object.hostname = ftp_site
ole_ftp.object.login = 'DOCCTS'
ole_ftp.object.certificate = ole_cer
ole_ftp.object.authentication = 2
ole_ftp.object.transfermode = 0
ole_ftp.object.blocking = 0
ole_ftp.object.protocol = 1
ole_ftp.object.compression = 6
ole_ftp.object.passive = 1
ole_ftp.object.port = port

pb_retrieve.enabled = false
ole_ftp.object.connect()

-----------------------------------------------------------

or... do I need to actually generate a keyfile thru Weonlydo
in the savekey operation
we've already send a copy of the public key to the vendor
that was generated from puttygen


ole_cer = CREATE oleobject
ole_cer.ConnectToNewObject("WeOnlyDo.Certificate.1")

ole_cer.generatekey(0)
ole_cer.savekey(f_path)

key_value = ole_cer.publickeyopenssh

li_filenum = FileOpen( f_path2, streamMode!, Write!, Shared!, Replace!)
fileWrite(li_FileNum, key_value)
fileclose(li_filenum)

question

by Jasmine, Monday, March 21, 2016, 18:44 (1274 days ago) @ ScotS

Hi Scots,

yes, wodCertificate *should* read Putty's keys.

However, it's much better to convert key to OpenSSH format. You can do that from PuttyGen. There is 'Conversions' menu in PuttyGen you can use to export your key to OpenSSH, which is native for wodCertificate.

I hope this helps!
Jasmine.