Differences

This shows you the differences between the selected revisions of the page.

2005-12-28 2006-01-08
verification of the host key (martin) move warning against attempts to automate host key verification (martin)
Line 11: Line 11:
By default interactive mode is used (the user is prompted in the same way as in GUI mode). To switch to batch mode (all prompts are automatically answered negatively) use the command ''option batch on''. For the batch mode it is recommended to turn off confirmations using ''option confirm off'' to allow overwrites (otherwise the overwrite confirmation prompt would be answered negatively, making overwrites impossible). By default interactive mode is used (the user is prompted in the same way as in GUI mode). To switch to batch mode (all prompts are automatically answered negatively) use the command ''option batch on''. For the batch mode it is recommended to turn off confirmations using ''option confirm off'' to allow overwrites (otherwise the overwrite confirmation prompt would be answered negatively, making overwrites impossible).
-Note also that the first connection to an SSH server requires [[ssh#verifying_the_host_key|verification of the host key]], which cannot be automated by scripting. Therefore, some provision for accepting keys must be made prior to running the script to connect to a new host.+Note also that the first connection to an SSH server requires [[ssh#verifying_the_host_key|verification of the host key]], which cannot be automated by scripting. Therefore, some provision for accepting keys must be made prior to running the script to connect to a new host. Never attempt to make the script verify the host key automatically.
WinSCP returns exit code 1, when any command is interrupted due to an error or any prompt is answered //Abort// (even automatically in batch mode). Otherwise it returns the exit code 0. WinSCP returns exit code 1, when any command is interrupted due to an error or any prompt is answered //Abort// (even automatically in batch mode). Otherwise it returns the exit code 0.
Line 21: Line 21:
If you are going to run the script under a different account (for example using the Windows scheduler), note that WinSCP [[config|stores its configuration]] to the user part of Windows Registry by default. So you may need to either transfer the configuration from your account registry to the other account registry or use the [[config|INI file]] instead. If you are going to run the script under a different account (for example using the Windows scheduler), note that WinSCP [[config|stores its configuration]] to the user part of Windows Registry by default. So you may need to either transfer the configuration from your account registry to the other account registry or use the [[config|INI file]] instead.
-Note that the configuration also includes [[ssh#verifying_the_host_key|verified host keys]], which you may need to transfer as well (or confirm manually under the account) to allow automatic execution of the script. Never attempt to make the script [[ssh#verifying_the_host_key|verify the host key]] automatically.+Note that the configuration also includes [[ssh#verifying_the_host_key|verified host keys]], which you may need to transfer as well (or confirm manually under the account) to allow automatic execution of the script.
===== Example ===== ===== Example =====

Last modified: by martin