Solstice PPP 3.0.1 Administration Guide

Changing the Login Dialog

The default CHAT script assumes that a link is to be established between two Solaris systems. If you are connecting to a machine running operating system you may need to change the expected login dialog.

For example, to connect to an OpenVMS system running PPP, modify the connect script as follows:


send    	RETURN
# Change "ogin:" to "name:" for OpenVMS
expect  	"name:"  10  onerror send BREAK repeat 3
 
send    	"ppp"
expect  	"word:" 40
#
# Set the ppp password of the remote host here
#
send	    "xxxxx"

The template CHAT script supports a simple method of logging in to a remote host. You can also modify and expand the CHAT script to create a more complex login dialog. Note that to initiate connections to a remote host running Solstice PPP, you must include a login id that is recognized by the remote host, and provide a way to start the Solstice PPP login service.

For example, the following CHAT script could be used to log in to a remote host running a Solaris environment, invoke mailx(1) to send an email message to indicate that the operation was successful, and start the Solstice PPP login service. Note that, in this case, the user account on the remote host that corresponds to the login id sent by the script must use /usr/bin/csh as the default shell.


# Chat script to invoke mailx on remote
#
# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
# setline 	cs7 parodd
 
# Start dialog with the remote host
send    	RETURN
 
# Set expected response, retry 3 times at 10 second intervals
expect  	"ogin:"  10  onerror send BREAK repeat 3
 
# Set login id (mylogin) sent to remote host
send    	"mylogin"
 
# Set response expected from remote host, wait up to 40 seconds
expect  	"word: " 40
#
# Set the login password (my passwd) of the remote host
send	    "mypasswd"
 
# Set response expected from remote host (C-shell prompt)
expect	  "%"
 
# Set command sent to invoke mailx
send	  "echo Login to remote successful | /usr/bin/mailx alias"
 
# Set response expected from remote host (C-shell prompt)
expect	  "%"
 
# Start PPP login service (pppls) on remote
send	    "/usr/sbin/pppls"

The following CHAT script could be used to log in to a telnet terminal server:


# Chat script to login to telnet server
#
# Set the line regarding the remote site configuration
# Due to UUCP limitations some systems only accept cs7
# setline 	cs7 parodd
 
 
send    RETURN
expect  "sername:" 10 onerror send RETURN repeat 5
 
send    "your_username"
expect  "assword:" 35
 
send    "your_password"
expect  "pc>" 10 onerror send RETURN repeat 2
 
send    "terminal flowcontrol hardware"
expect  "pc>" 10 onerror send RETURN repeat 2
 
send    "terminal databits 8"
expect  "pc>" 10 onerror send RETURN repeat 2
 
send    "terminal parity none"
expect  "pc>" 10 onerror send RETURN repeat 2
 
send    "terminal escape-character 0"
expect  "pc>" 10 onerror send RETURN repeat 2
 
send    "terminal telnet-transparent"
expect  "pc>" 10 onerror send RETURN repeat 2
 
send    "telnet your_own_machine"
expect  "ogin:" onerror send RETURN repeat 5
 
send    "your_login_for_PPP"
expect  "assword:" 35
 
send    "your_password _for_PPP"