In scripting you should not rely on saved sites

Advertisement

itsaftab
Joined:
Posts:
2

In scripting you should not rely on saved sites

I keep on getting this on the log for my scripts. I have the latest version of WinSCP installed.
What should i do?
The scrip is working fine though.

In scripting you should not rely on saved sites, use this command instead:
open sftp://P123456789@123.456.78.9/ -hostkey="ssh-rsa 2048 57:ae:69:df:d3:d8:49:f2:86:d2:ca:ab:57:fd:4e:ef" -privatekey="C:\WinSCP\privatekey.ppk" -rawsettings AgentFwd=1 SFTPMaxVersion=3
Searching for host...
Connecting to host...
Authenticating...
Using username "P123456789".
Authenticating with public key "rsa-key-20150511".
Authenticated.
Starting the session...
Session started.
Active session: [1] eInnvoice_Receive

Reply with quote

Advertisement

blasword
Joined:
Posts:
2

I am also getting this notification. Although I am already using the suggested command. Is it giving the notification because I also have the site as a saved profile?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

blasword wrote:

I am also getting this notification. Although I am already using the suggested command. Is it giving the notification because I also have the site as a saved profile?
You can get the warning, if your stored site name is exactly the same as session URL. In that case WinSCP will actually use the stored site. You can use /ini=nul to isolate your script from your global configuration.
See https://winscp.net/eng/docs/scripting#configuration

Reply with quote

Advertisement

You can post new topics in this forum