-hostkey signature error "whitespace"
Hi,
I'm trying to upload a file to a remote server.
For information I'm using Microsoft SQL Server (job task) that use PowerShell.
So when I concatenate the parameters PowerShell do not ignore the whitespace and it cut it, Ex:
It give an error:
It cut everything after the whitespace, I tested with a lot of combinations and nothing..
ex:
For information all that I found is escaping the whitespace in the file path not in the parameters (theoretically it's the same) ex:
PowerTip: Run a PowerShell Script with Space in the Path - Scripting Blog [archived]
This is the documentation page: https://winscp.net/eng/docs/scripting
Any help will be so appreciated
Thanks
I'm trying to upload a file to a remote server.
For information I'm using Microsoft SQL Server (job task) that use PowerShell.
So when I concatenate the parameters PowerShell do not ignore the whitespace and it cut it, Ex:
D:\winscp\WinSCP.com /log=D:\winscp\winscp.log /command "open sftp://user:password@address -hostkey=""ssh-ed25519 256 npaaxdsra.....EmNyc=""" "put $zfile /data/folder/" "exit"
Because the hostkey passed do not match with the key that I sent (from the log).(Exception) **Host key does not match configured key
Script: open sftp://user:***@address/ -hostkey=ssh-ed25519
ex:
`
| &('..')
For information all that I found is escaping the whitespace in the file path not in the parameters (theoretically it's the same) ex:
PowerTip: Run a PowerShell Script with Space in the Path - Scripting Blog [archived]
This is the documentation page: https://winscp.net/eng/docs/scripting
Any help will be so appreciated
Thanks