Contents:
Part Three:
Testing Psuedo tty's
Testing Psuedo-ttys
To find available pseudo-ttys, first use the 'ls' command to find which
pseudo-tty devices are available in /dev (the operating system specific
sections below describe the naming conventions).
Pseudo-ttys are used for many purposes, but mostly for remote login
(telnet or rlogin). These can usually be seen with the 'who' or
'ps' command. Pseudo-ttys which appear to be free can then be
tested using the 'dd' command on the master device. Example:
dd if=/dev/ptyp5
Tests /dev/ptyp5 for availability. If dd just hangs waiting for
input then you've found an available working psuedo-tty. If a
similar message to the following appears:
dd: cannot open /dev/ptyp5:
I/O error (error 5)
then that psuedo-tty is already in use.
This message:
dd: cannot open /dev/pty1000:
No such file or directory (error 2)
means that there is no device file of that name. Check that the
name is typed correctly.
This message:
dd: cannot open /dev/ptyp32:
No such device or address (error6)
means that the psuedo-tty device file exists, but the kernel isn't
configured to support it. Unfortunatly, there is considerable
variation between psuedo-tty implementations on different operating
systems, therefore this technique may not work in all cases.
Note that svr-tty is capable of finding available psuedo-ttys by using
the new configuraion file format. Consult the "Setting
up svr-tty - the Configuration File" section for more information.
Using Remote Ports on AIX
The precompiled binary of svr_tty was compiled and tested on AIX 4.1.
Valid pseudo-tty master device names are: ptsp[0-9a-f], and the corresponding
slave device names are: /dev/ttyp[0-9a-f]. The daemon may be started
from an entry in /etc/inittab, i.e.:
ts:2:respawn:/etc/svr_tty
-D /temp/svr-tty.log
Alternatively, an /etc/rc script could be used.
Using Remote Ports
on BSDI UNIX
The precompiled binary of svr_tty was compiled and tested on BSDI v2.1.
Valid pseudo-tty master device names are: pts[pqrs][0-9a-f], and the
corresponding slave device names are: /dev/tty[pqrs][0-9a-f].
The daemon may be started by placing a command to invoke it in the file
/etc/rc.local:
/etc/svr_tty -D/tmp/svr_tty.log
Using Remote Ports on HP/UX
The precompiled binary of svr_tty was compiled and tested on HP/UX
10.01. Valid pseudo-tty master device names are: pts[pqr][0-9a-f]
and the corresponding slave device names are: /dev/tty[pqr][0-9a-f].
There is also support for the 'ptym/pty*' pseudo-tty master naming convention.
The slave devices corresponding to these are called '/dev/pty/tty*'.
The daemon may be stared from an entry in /etc/initab, e.g.:
ts1:34:respawn:/etc/svr_tty
-D/tmp/svr_tty.log
Using Remote Ports on Linux
The precompiled binary of svr_tty was compiled and tested on Linux
v2.0.0 (ELF format with shared libraries). Valid pseudo-tty master
device names are: pts[pqrs][0-9a-f] and the corresponding slave device
names are: /dev/tty[pqrs][0-9a-f]. The daemon may be started by
placing a command to invoke it in the file /etc/rc.d/rc.local:
/etc/svr_tty -D/tmp/svr_tty.log