The Logon Actions category of the Session Options dialog allows you to run scripts to automate logging on to a remote machine and perform other functions.
Automate logon
Check this option to create a simple script to automate logging on to a remote machine. Use the Expect and Send fields to enter the character strings that SecureCRT should expect to receive from the remote machine and should send as its response. If you want SecureCRT to send a carriage return before running a script, check the Send initial carriage return option.
Send initial carriage return
Check this option if you want SecureCRT to send a carriage return to the remote machine before starting the automated logon script. Some systems will not display a logon prompt until receiving a carriage return.
Expect / Send
In the Expect entry boxes, enter the character strings that SecureCRT should expect to receive from the remote machine in the order that they should be received. In the associated Send entry boxes, enter the strings that you want SecureCRT to send in response when it receives the Expect string. For a list of function key commands that can be included in Send strings, see Send String and Function Key Commands.
Note: SecureCRT works through the Expect strings from top to bottom; in other words, if SecureCRT does not receive the first expected string, it will not send the associated Send string or listen for the next expected string.
Example script:
The following is an example script that will instruct
SecureCRT to listen for the logon prompt "Logon>
"
and respond with the username "johnsmith
" when
the prompt is received. SecureCRT will then listen for "Password>
"
and respond to it with "way2easy
". Finally, SecureCRT
will listen for the string "Welcome
" and respond
with the directory request "dir
".
Expect: |
|
Send: |
|
Expect: |
|
Send: |
|
Expect: |
|
Send: |
|
Hide
Check this box to have the Send string shown as asterisks. This option lets you avoid displaying confidential information such as a password.
Logon script
Check this option to select a script file that you want SecureCRT to run when it makes a connection A data path or circuit between two computers over a phone line, network cable, or other means. .
Note: If the Automate logon option is also selected, it will be executed first.
Remote command
Enter the command that you want SecureCRT to instruct the remote machine to run when a connection A data path or circuit between two computers over a phone line, network cable, or other means. is made.
Note: The remote command is the only command that the session will run. Once the command exits, the session will disconnect.
Display logon prompts in terminal window
Check this option to have SecureCRT display logon prompts in the terminal window.