I’m trying to use the UiPath.FTP.Activities package to connect to a SFTP server using a private RSA key. When doing so I get an error :
“String reference not set to an instance of a String, parameter name s”
I get this error because I left the password field empty. If I put an empty string instead I get a Permission denied (password) error because it’s trying to log using the password.
I think the activity is always trying to connect using the password. Even when I don’t want to because i’m using a private key.
Hi @Ilya_Kochetov i tested it again but i get this password error again. I checked the thread from @Pouzee and i see that is still in development. I’m open to any ideas for this. Please let me know what do you think. Thanks
Below i added a print screen of the Properties
@CristianDan, I see that my code is already merged into the main branch, so please confirm that you downloaded the latest updates and rebuild the nuget
I think what happend is that while the new code is available the new version was not compiled by and pushed to nuget feed.
Your best way to get an updated version is to use this project GitHub - UiPath/Community.Activities: Repository of Windows Workflow Foundation Activities for UiPath Community and compile it yourself in Visual Studio (it’s free from Microsoft and there are good guides on UiPath documentation about how to do that).
If you are unable to do so you will have to wait for someone to do this for you
@CristianDan, I’ve compiled the latest version of FTP activity and checked that it works. Please note that it’s exactly the same code as in the official repository, so I suggest you only use it until the official feed will be updated with the latest version
Hi guys, did you solved this issue? I’ve tried with the unofficial package indicated by @Ilya_Kochetov but still no luck. The new error message is “Invalid private key file”.
FileZilla and Putty are working fine with the same private key file.
Thanks
@Mugur you need to convert your key into OpenSSH key. PPK keys used by putty start with PuTTY-User-Key-File-2: ssh-rsa
you need to have a key starting with -----BEGIN OPENSSH PRIVATE KEY-----EDIT: THIS IS INCORRECT -----BEGIN RSA PRIVATE KEY-----
Hi @Ilya_Kochetov
I’ve converted the Putty ppk in OpenSSH key as indicated. Now it’s starts with
-----BEGIN OPENSSH PRIVATE KEY-----
Then I’ve tried to open the ftp connection but the below error was raised
Should I do something else? I have to change something on the public key too?
Thanks
My bad, I completely forgot that it’s not OpenSSH, it’s RSA. The key should start with -----BEGIN RSA PRIVATE KEY-----
Open your command line and type ssh-keygen -p -m PEM -f <name of your openssh key>
it will be converted