This is an old revision of the document!

Why WinSCP does not work in a new environment (operating system, machine, user account, network), when it works for me in a different environment already?

You may have made WinSCP working in some environment already, but you have failed to make it work in the new environment, be it new machine, new version of Windows, different user (or system) account, different network or combination of thereof.

There may be numerous reasons for this, some of which, including solutions, follow.

Advertisement

Configuration

Configuration of WinSCP in the new environment may differ. Term configuration here does not include only preferences, but also stored sessions and caches for accepted SSH hostkeys and SSL/TLS certificates.

Note that even when you are running WinSCP on the same machine as before, just under a different account (including different system account, such as when using Scheduler, SSIS, etc), you may not have the same configuration. By default WinSCP uses account-specific hive of registry to store its configuration, which is not accesible by other accounts. You may want to use INI file instead to ease configuration sharing.

Learn how to transfer your existing configuration to the new environment in general.

Particuarly when using scripting you should avoid depending on configuration, where possible. In script always specify fingerprint of expected hostkey or certificate explicitly, instead of depending on caches.

If you are not able to find what differs between environments, turn on logging in both of them and compare the logs. It should become obvious. Even if you give up and decide to seek support, make sure you post both complete logs.

You may want to check more specific article dealing with problems running WinSCP script under Windows Scheduler, SSIS or other automation services.

Firewall

If you are having problems conecting and you are sure your configuration is exactly the same in the new environment, it may be worth checking if your connection is not blocked by a firewall.

See article dealing with firewall issues.

Last modified: by martin