home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
200-299
/
ff247.lzh
/
RemoteLogin
/
ReadMe
< prev
next >
Wrap
Text File
|
1989-09-15
|
6KB
|
142 lines
SPMON and PWCHECK by Dave Kinzer
These are a couple of programs which make possible remote access to
your Amiga. One program checks the serial port for an incoming call, and
starts a program when it is detected. The other is a password protection
program which allows starting various programs based upon login id. This
provides some (OK, call it minimal) security for your computer.
SPMON: (Serial port monitor)
The first program monitors the status of the serial port carrier
detect bit. When this bit makes a transition (indicating that the
modem has just connected), the program tries to open the serial device.
If the open fails, someone else is using the serial port (like a
terminal program or whatever). In this case, the program ignores the
transition and goes back to waiting for another transition. If the
open call to the serial device works, it means that no program is
connected to the serial device, and it was an incoming call that
caused the carrier detect to become active. In this case, a program
is executed. This software allows any program to be run, but the
best thing is probably the password program (which can spawn different
programs based upon login id.) In either case, the port monitoring
program continues to run in the background, waiting for another call
to come in.
The port monitoring program is not very 'clean' in that it looks
directly at the hardware. The proper way to write this program would
have it open the serial device (if not blocked by someone else), and
then check the status of the carrier detect bit by checking the serial
flags. There are two reasons I decided to not do it this way. First,
it is a lot of overhead for a background program which runs every three
seconds. And second, by looking directly at the hardware the serial
device is never blocked (even for a moment, you know the one, that one
that you start your terminal program in.) This provides complete
transparency for you while you are working directly on your Amiga.
This scheme might be difficult to implement on an expansion serial
device. The auto-config system would map the hardware in memory and
you would have to go mucking around system tables to track it down. In
that case it might be easier to use the proper way to interrogate the
modem status, and perhaps trade off response time to reduce the system
load and probability of conflict.
To use spmon, just run it in the background. Give it command line
to be executed when the carrier detect transition is found. For example,
to allow remote access to your Amiga without any password security, type
the following:
run spmon "newcli AUX:"
When you call in to the Amiga, the modem answers and connects which
causes the carrier detect signal to become active. Within a few seconds,
a CLI message and prompt is issued. You then can do all the commands
which do not require special features (like windows, screens and arrow
keys) to be run from the remote location. When you are finished, type
ENDCLI and hang up. This will assure that you do not have the serial
port tied up when you get home to your Amiga. If you call again, a new
CLI will be created. Note that the Amiga will put up requesters if you
try to write to a write-protected disk, or try to access an off-line
volume. This will hang your session, with no way to recover from the
remote site. There are programs around that solve this problem, but I
have not tried them yet. It would be in your best interest to check
this out.
PWCHECK: (Login prompt and password checking program)
Pwcheck is a password program to prevent unauthorised access to your
Amiga. It allows running different programs based upon login ID. It
also allows you to have a banner message before login is accepted.
Pwcheck accepts one or two filenames. The first filename is the
password file name. The format of the file is lines containing three
fields separated by colons. The first field is the login id, the second
is the password, and the third (the rest of the line) is the command that
will be executed if this the login and password match. Lines that start
with a space or asterisk are ignored.
For example:
--
* Password file for my Amiga
dave:xyzzy:newshell AUX:
nuucp::uucico
bbs::mybbsprog
bbs_sysop:oper:mybbsprog -s
--
The second file is an optional header file which is simply copied out
the serial port. An example file might be:
--
* * * Welcome to Dave's Amiga Computer * * *
Please log in. If you wish to get access to the bbs program,
at the login prompt type bbs. There is no password.
--
Now placing the following in your startup sequence file will allow you
to have (fairly) secure access to your Amiga (assumes files on volume LOG:.)
run spmon "pwcheck LOG:pwfile LOG:bannerfile"
Pwcheck answers at the default speed (in other words, I did not send
the serial device any change of speed information.) There is no
provision for automatically detecting the incoming baud rate.
The pwcheck program is cleaner than the port monitoring program since
it deals directly with the serial device. To make this work with
expansion serial ports it should only be neccessary change the name of
the device opened. This could be made a command line arguement for the
utmost in portability.
These programs are placed in the public domain by the author Dave Kinzer.
Note:
No, I don't have a BBS program nor have I modified uucico to work with
this (yet). They are only some good examples which may stir the imagination
of capable people.
Happy Computing
Dave Kinzer