new keys - WeOnlyDo Discussion board

new keys (wodFtpDLX / wodFtpDLX.NET)

by Scot Styer, Wednesday, March 09, 2016, 17:48 (2968 days ago)

I need to create
a new public SSH key to send to our vendor for their sftp site
it's been a long time, since I've done this and can't remember a log

from what I remember... this will create a public key, to send to the vendor

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)

but, I believe that I need the private key on my side
to be able to communicate
I had been using, the section below
I "believe" that I had created two files above... I file had the public key
and, one the private
the private key would be used below

ole_cer = CREATE oleobject
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

new keys

by Scot Styer, Wednesday, March 09, 2016, 18:11 (2968 days ago) @ Scot Styer

Oh... think I have it
the savekey will save the public key
and, the keyvalue... with the write to the file
will save the private key

new keys

by Jasmine, Wednesday, March 09, 2016, 19:19 (2967 days ago) @ Scot Styer

Hi Scot.

Yes, one of things you need is SaveKey. Another one is property PublicKeyOpenSSH which will return public key in OpenSSH format, which you need to send to the server.

I hope this helps!
Jasmine.