Termination scripting is analogous to the Logon Scripting except it is executed when the SSH2/Telnet session is terminated. The commands within the file cleanup.bat are invoked upon termination of a SSH2/Telnet session. This is invoked with both normal and abnormal terminations. Cleanup scripting is available on both a global and per user basis as with Logon Scripting.
NOTE: No applications that require user input are allowed in the cleanup scripts.
It is especially useful for properly un-mapping network connections such as drives. If you do not un-map drives when terminating the session you may be unable to connect to them the next time you logon. The cleanup.bat file allows automatic un-mapping of drives upon termination of the telnet session.
The system administrator has setup user “Adam’s” logon script to map drive “f” as a network drive. In user “Adam’s” cleanup.bat script the system administrator will un-map the drive when the session is terminated.
This will un-map the f drive after the session is terminated.
NOTE: Please see the section on logon scripting to determine the location for the cleanup script files.