connect
PURPOSE
Establishes a connection to a remote system.
SYNOPSIS
connect [ -b [ file: ] rmthost ]
connect [ flag[option] [ -fh ] [ -qd ] [ -e [esc] ] [ -s [rate] ]
[ file:rmthost ] [ !cmd ] [ -r pgm ] ]
DESCRIPTION
The connect command lets you establish a connection to a
remote host. connect runs in two parts. The first part
makes the connection with the remote system specified by
rmthost. The second part is a program called the talker.
It runs automatically and exchanges data with the
rmthost. For information about the talker program, see
connect in AIX Operating System Technical Reference. Any
flags that you specify are passed directly to the talker
without interpretation. The default talker for asynchro-
nous links is atalk.
The connect command uses a system-wide control file,
connect.con, located in /usr/lib/INnet. You can specify
an additional control file, file:rmthost. If you do not
specify an additional file, connect searches $HOME/bin
for a connect.con file. Information needed to complete
the connection is found in one of these files.
Attributes needed to complete the connection are taken
from the control file or from the command line assignment
var=val. For a description of the parameters, see
connect in AIX Operating System Technical Reference.
When atalk detects an escape sequence in the input, it
places the work station in its former mode of operation
and prompts you with the local prompt. You can then use
the flags that follow. Once the flag has run, atalk
returns to its former mode.
The connect command does not limit access to the phone
system to control dialing based on the number to be
called.
Warning: The connect command lets you set up and main-
tain connections through a wide variety of communications
devices. It interacts with you through the file
connect.con which is free-format. Problems with the
format of this file may cause unpredictable results.
FLAGS
Note: There are no spaces between the flags and the
associated parameters.
-b Sends a break to the port. This is done by
lowering the transmission speed to 75 bps and
transmitting an ASCII NULL on the port. If the
speed is too low, less than 100 bps, this may
not work.
-d
-q Closes, quits (q) or disconnects (d) the port.
Note that this does not end your job or session
at the remote site. After closing the port,
connect exits.
-e[esc] Sets the escape sequence to the character
string esc. If you do not specify esc, connect
displays escape sequence. It takes the default
escape sequence from the environment variable
CONESC, if defined, or else sets it to:
Ctrl-VuCtrl-M
-f
-h Enables (-h) or disables (-f) local echoing.
-iname Writes file name to the port.
Warning: If you are connected to the remote
host by RS-232 lines, data from the file may be
lost if the remote host cannot keep up with the
input.
Normally, this flag is used to transfer a small
file from the local site to the remote site.
File transmission must be ended manually by
pressing Ctrl-D.
For example:
cat > newfile
[escape sequence]
LOCAL: ifred
.
Ctrl-D
-mprompt Set the local prompt to the prompt character
string. connect displays this prompt when it
recognizes the escape sequence. By default, it
sets the prompt to the value of the environment
variable CONPMT. If this variable is not set,
it uses the the string LOCAL:.
-parg Sets parity as specified by arg, where arg is
one of the following characters: o (odd), e
(even), 7 (both even and odd), or 8 (eight data
bits).
-rpgm Runs the network program pgm. Anything fol-
lowing pgm on the command line is passed to pgm
as an argument, along with the additional argu-
ments -i3 -o3. The port set up as file
descriptor 3. The program is run as a child
process.
-srate Sets the transmission speed to rate, which is
one of the following: 0, 50, 75, 110, 134,
150, 200, 300, 600, 1200, 1800, 2400, 4800,
9600, exta, extb (0 effectively turns off the
port). If you do not specify rate, current
transmission speed displays.
-targ Enables or disables transcripts. If arg is any
character string other than a minus or plus
sign, the transcript function is enabled with
the specified file arg as transcript. When you
use an existing file as a transcript file, new
data is added to its end. Use t- to disable
the transcript function, and t+ to enable the
transcript to the previous transcript file (no
default).
-wsec Sets the inter-line delay of the include func-
tion to cause a delay interval of the specified
seconds between each line written to the port.
The default value is 0.
-xarg Enables or disables input or output flow
control. If the input flow control is enabled,
CTRL-S and CTRL-Q are automatically sent to the
remote host to control the rate at which it
transmits data. If the output flow control is
enabled, CTRL-S and CTRL-Q are automatically
honored if received from the host. This is
useful when using the include command. xi+
enables input flow control. xi- disables input
flow control. xi displays the current state.
For control of output flow control, replace xi
with xo. See the discussion of IXON and IXOFF
in the termio file in AIX Operating System
Technical Reference.
!cmd Runs the AIX command cmd. Anything that
follows !, including arguments to cmd, is
passed to the local shell to be run by the
system system call. In particular, all I/O
redirection and piping works.
FILES
/usr/lib/INnet/connect.con System-wide connection control
file.
$HOME/bin/connect.con Private connection control file.
/usr/lib/INnet/dialers/* System-wide dialer programs.
$HOME/bin/* Private dialer programs.
/usr/lib/INnet/atalk Default talker program, asyn-
chronous lines.
/etc/sites Network sites file.
/etc/locks Directory for locks on ports
(devices) used for logins and
out-going connections.
RELATED INFORMATION
The system and exec system calls, the connect subroutine,
and the termio special facility in AIX Operating System
Technical Reference.