This first procedure just sets a few conditions up and need only be typed once for all time.
rlogin sysa
(Type your PC/sysa password at this point)
echo "hex.eng.abdn.ac.uk" > .rhosts
chmod og=r .rhosts
logout
(brings you back to hex)
The above has created a file called .rhosts in your sysa home directory which gives your userID on hex permission to issue remote commands to sysa. As long as this file exists, your account on hex will be able to use the following commands (rcp and remsh).
You may want to be able to use the commands from both goss and hex, but you will find that repeating the above procedure from the other computer deletes the previous file. A slightly more involved procedure will allow you to access sysa remote commands from both hex and goss:
rlogin sysa
(Type your PC/sysa password at this point)
cat > .rhosts
hex.eng.abdn.ac.uk
goss.eng.abdn.ac.uk
"Ctrl+d" (press the Ctrl key and type "d" - this writes the .rhosts file
to disk).
chmod og=r .rhosts
logout
(brings you back to hex)
Now, assuming that you have a file called tabulate.c, you can send this to the printer (via sysa) using the following commands:
rcp tabulate.c sysa:tabulate.c
remsh sysa
/local/bin/aprint -Phold tabulate.c
The first command copies your file to your home directory on sysa. The second
line issues the command
aprint -Phold tabulate.c remotely onto sysa. The
file referred to here is the sysa copy of tabulate.c that you created with the
first command.
You can create the effect of both of the above commands using the following:
remsh sysa /local/bin/aprint -Phold < tabulate.c
The < sign is very important here and redirects the contents of
tabulate.c (the version on hex) into the remsh
command which is connected to
the aprint command running on sysa. No named copy of your file is
ever
actually created on sysa.
Rcp (remote copy) can be used in a number of ways. For example's sake (and not part of your exercise today)
rcp tabulate.c sysa:PCFILES/tab.c
(will copy
tabulate.c from hex into your drive H: as you see it from a PC)
rcp sysa:PCFILES/graphs.m graphs.m
(will take a copy
of graphs.m in your PC's drive H: into you current directory on hex. As you can
see, rcp works in both directions: to as well as from hex)
etc..