SFTP with .PPK file
Stephen MacLean
smaclean at madmansoft.com
Thu Mar 16 08:24:34 EDT 2017
Hi Charles,
One other thing… in looking at the .ppk file, it contains both “public lines” and "private lines”. All I see in the ssh key file is private.
Not sure that make any difference, but thought I’d mention it.
Best,
Steve
> On Mar 16, 2017, at 7:53 AM, Stephen MacLean via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi Charles,
>
> Thank you so much for reply!
>
> I converted the key file as you described, however, I’m still getting the error 67 (authentication error) when running the script.
>
> Any further help would be greatly appreciated.
>
> Best,
>
> Steve MacLean
>
>> On Mar 16, 2017, at 3:08 AM, Charles Warwick via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> Hi Steve,
>>
>> It looks like you are using a SSH private key in PuTTY format (.ppk). tsNet requires it to be in OpenSSH format.
>>
>> That is easy to fix though, you can convert the .ppk with PuttyGen.
>>
>> To do this, open PuttyGen and load the .ppk file. Then select "Conversions" -> "Export OpenSSH key".
>>
>> Apart from that, just make sure that your call to tsNetGet includes the full path of the file you want to download.
>>
>> Hope that helps,
>>
>> Cheers,
>>
>> Charles
>>
>>
>> On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:
>>> Well, still no luck in getting it to work, but getting closer…
>>>
>>> I found a sample file linked to on livecode.com <http://livecode.com/>. Modifying it to use the key file, I have:
>>>
>>> on mouseUp
>>> local tHeaders, tResult, tSettings
>>> put “xxxxxxxx" into tSettings["username"]
>>> put URL "binfile:D:\private.ppk" into tPrivKey
>>> put tPrivKey into tSettings["ssh_priv_key"]
>>> tsNetInit
>>> put tsNetGet("1", "sftp://secure.xxxxxxxx.us/", tHeaders, "transferComplete", tSettings) into tResult
>>> end mouseUp
>>>
>>> However, it returns:
>>>
>>> tsneterr: (67) Authentication failure
>>>
>>> Again, I can access the sftp site with no problems using the WinSCP ftp client and the key file.
>>>
>>> Any suggestions??
>>>
>>> Thanks,
>>>
>>> Steve MacLean
>>>
>>>> On Mar 15, 2017, at 9:38 AM, Stephen MacLean via use-livecode <use-livecode at lists.runrev.com> wrote:
>>>>
>>>> Hi All,
>>>>
>>>> Looking to use tsNet to connect to a SFTP server that uses username and a private key instead of a password. The private key is contained in a file.
>>>>
>>>> I use WinSCP and can link the connection to the file and can connect fine.
>>>>
>>>> In LC, I’ve set the CABundle to the file, but am not sure this is how it’s supposed to work. Getting an auth error when doing tsNetGet.
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> Thanks,
>>>>
>>>> Steve MacLean
>>>>
>>>> PS: Running 9.0 dp6 Business
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list