Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Adding private key path to when synchronizing a two way delete

Either modify the script to construct SessionOptions with SshPrivateKeyPath property, the way I've already shown you on Stack Overflow:
Configure WinSCP PowerShell script to also include a private key

Or encode the key into the session URL:
sftp://user;fingerprint=ssh-rsa-xxxxxxxxxxx...@example.com;x-publickeyfile=C%3A%255Cmykey.ppk@example.com/

WinSCP GUI can generate such URL for you:
https://winscp.net/eng/docs/ui_generateurl#url
ecuso100

Adding private key path to when synchronizing a two way delete

Hello
I would like to inquire if it is possible to add a Private Key path to the script referred to here:
Two-way synchronization with delete with SFTP/FTP server

The script that needs to run does not seem to have an area to add a path to the private key.
powershell.exe -File C:\path\SynchronizeTwoWayDelete.ps1 -sessionUrl "sftp://user:password;fingerprint=ssh-rsa-xxxxxxxxxxx...@example.com/" -localPath "C:\local" -remotePath "/remote" -listPath "C:\cache\example.txt"

Is this possible?