Hi everyone,
I’m currently building an automation which downloads and uploads files to SFTP. I have no dev background and that is why I try to rely on prebuilt activities as much as possible. However, SFTP activities seem to be not suitable for me. First I had to install the Alpha version of UiPath FTP activities to use a proxy server and now I am facing the error that ssh-rsa key files seem to be not supported (or I don’t know how to use them).
@marian.platonov You already shared the alpha version of the activity in another thread. Can you share details about whether the activity will support ssh-rsa keys in the future and when the 2.4 alpha will be in the official stable releases? Is there a place to follow up on this?
FTP Scope: openssh key type: ssh-rsa is not supported
Apart from this I have the option to go for WinSCP which can be added as a dependency. I tried this but I am failing to get the code right for the invoke code activity to use this. Can someone maybe share a demo project in which this is working?
Try
' Setup session options
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = "example.com"
.UserName = "user"
.Password = "mypassword"
.SshHostKeyFingerprint = "ssh-rsa 2048 xxxxxxxxxxx..."
End With
Using session As New Session
' Connect
session.Open(sessionOptions)
Dim directory As RemoteDirectoryInfo =
session.ListDirectory("/home/martin/public_html")
Dim fileInfo As RemoteFileInfo
For Each fileInfo In directory.Files
Console.WriteLine(
"{0} with size {1}, permissions {2} and last modification at {3}",
fileInfo.Name, fileInfo.Length, fileInfo.FilePermissions,
fileInfo.LastWriteTime)
Next
End Using
Return 0
Catch e As Exception
Console.WriteLine("Error: {0}", e)
Return 1
End Try
End Function