Differences
This shows you the differences between the selected revisions of the page.
2013-11-18 | 2013-12-20 | ||
"host key" are two words (martin) | 5.5 removing beta tags (martin) | ||
Line 4: | Line 4: | ||
Possible consequences are: | Possible consequences are: | ||
* The script fails (or "hangs"), because the [[ssh#verifying_the_host_key|host key]] ([[SFTP]] or [[SCP]]) or [[ftps#certificate|certificate]] (FTPS) is not known by the service's account, and WinSCP fails (or asks for) its verification. | * The script fails (or "hangs"), because the [[ssh#verifying_the_host_key|host key]] ([[SFTP]] or [[SCP]]) or [[ftps#certificate|certificate]] (FTPS) is not known by the service's account, and WinSCP fails (or asks for) its verification. | ||
- | * The connection fails, because your script depends on [[session_configuration#site|site]] (stored session), &beta which is not known by the service's account. | + | * The connection fails, because your script depends on [[session_configuration#site|site]], which is not known by the service's account. |
* Environment variables referenced in script are not resolved, because they are not set by the service's account. | * Environment variables referenced in script are not resolved, because they are not set by the service's account. | ||
* Access to files on mapped network drives fails, because the drives are not mapped for the service's account. | * Access to files on mapped network drives fails, because the drives are not mapped for the service's account. | ||
- | To check what [[config|configuration storage]] is used, whether a site name was recognised or under what Windows account the script is running, inspect a beginning of [[logging|session log]]. For example, following log shows that the configuration was read from Windows registry, the script was running under local account ''martin'' and ''mysession'' was recognised as a site (stored session) &beta name. | + | To check what [[config|configuration storage]] is used, whether a site name was recognised or under what Windows account the script is running, inspect a beginning of [[logging|session log]]. For example, following log shows that the configuration was read from Windows registry, the script was running under local account ''martin'' and ''mysession'' was recognised as a site name. |
<code> | <code> | ||
Line 20: | Line 20: | ||
</code> | </code> | ||
- | If there was no such site (stored session) &beta in current configuration storage (Windows registry in this case), ''mysession'' (as passed to ''[[scriptcommand_open|open]]'' command) would be interpreted as host name and the log line would say: | + | If there was no such site in current configuration storage (Windows registry in this case), ''mysession'' (as passed to ''[[scriptcommand_open|open]]'' command) would be interpreted as host name and the log line would say: |
<code> | <code> | ||
Line 28: | Line 28: | ||
Solutions: | Solutions: | ||
* [[scripting#hostkey|Specify fingerprint of expected host key or certificate]] explicitly in the script. ((Alternatively make sure the [[ssh#verifying_the_host_key|host key]] or [[ftps#certificate|certificate]] is verified under the service's account.)) | * [[scripting#hostkey|Specify fingerprint of expected host key or certificate]] explicitly in the script. ((Alternatively make sure the [[ssh#verifying_the_host_key|host key]] or [[ftps#certificate|certificate]] is verified under the service's account.)) | ||
- | * Configure your session completely using ''[[scriptcommand_open|open]]'' command, using [[session_url|session URL]] (and [[rawsettings|raw session settings]], if needed), instead of storing [[session_configuration#site|site]] (stored session). | + | * Configure your session completely using ''[[scriptcommand_open|open]]'' command, using [[session_url|session URL]] (and [[rawsettings|raw session settings]], if needed), instead of storing [[session_configuration#site|site]]. |
* Alternatively use [[config|INI file]] instead of registry to store the configuration to make sure the [[session_configuration#site|site]] (and/or other settings) can be accessed by all accounts. ((You can also [[config#transfer|transfer the site]] (and/or other settings) to the service's account instead.)) | * Alternatively use [[config|INI file]] instead of registry to store the configuration to make sure the [[session_configuration#site|site]] (and/or other settings) can be accessed by all accounts. ((You can also [[config#transfer|transfer the site]] (and/or other settings) to the service's account instead.)) | ||
* Good practice is to develop your scripts with [[scripting#configuration|configuration isolated from GUI]]. | * Good practice is to develop your scripts with [[scripting#configuration|configuration isolated from GUI]]. |