rsh question.

Matthew Seaman m.seaman at
Sun Oct 15 11:02:20 BST 2000

On Sat, Oct 14, 2000 at 03:19:30PM -0500, Guillermo Ponce wrote:
> Hello,
> I would like to run a program shell in one computer that has AIX from my
> computer that has FreeBSD?  How could I do that?
> I'm trying to use rsh and I know that I have to put the host names in
> the
> /etc/hosts file.

If you really must use rsh, then you need to put the hostname and your
username from the source machine (here your FreeBSD box) into the
~/.rhosts file in your account on the target (AIX) machine --
something like this: cat ~/.rhosts	geponce

Also check that the ~/.rhosts file is owned by you, not writable by
anybody else and that your home directory on the target machine is
only writable by you: chmod 644 ~/.rhosts chmod 755 ~

Now for the standard warning to anyone trying to use one of the `r'
commands.  They aren't sufficiently secure to use on an open network.
If your target AIX machine supports it, far better to use ssh, which
will prompt you for passwords if necessary. Ssh is standard on FreeBSD

> I want to do something like  this for example:
> /lhome/e-applications/computer_with_FreeBsd> rsh  cat
> file1 >> file2
> file1 and file2 are on the computer with AIX

You need to quote any characters with special meaning to the shell, or
they will be interpreted locally:

rsh otherhost cat foo >> bar

will append the contents of the remote file `foo' to the local file `bar'.

rsh otherhost cat foo '>>' bar


rsh otherhost 'cat foo >> bar'

will append `foo' to a remote file `bar'


Dr Matthew J Seaman MA, D.Phil.                          26 The Paddocks
                                                         Savill Way
Tel: +44 1628 476614                                     Bucks., SL7 1TH UK

More information about the Ukfreebsd mailing list