Re: rsh and rcp problems between Solaris and FreeBSD

From: John Von Essen (essenz_at_bjork.quonix.net)
Date: 12/31/03

  • Next message: Kevin D. Kinsey, DaleCo, S.P.: "Re: firewall question..."
    Date: Wed, 31 Dec 2003 10:08:03 -0500 (EST)
    To: Matthew Seaman <m.seaman@infracaninophile.co.uk>
    
    

    I can do two rsh's back to back with no problems, its the third (and 4th
    and so on) that hang.

    On the FreeBSD side, after the first rsh, netstat shows:

    tcp4 0 0 mx100.851 embryo.bluebell..1021
    TIME_WAIT
    tcp4 0 0 mx100.shell embryo.bluebell..1022
    TIME_WAIT

    Those connections stay around for awhile, about 30 seconds. Only when they
    disappear does the next rsh work.

    As for the rcp, I was missing a trailing slash, apparently rcp -r syntax
    between Solaris and FreeBSD is a little different. So the rcp's work, but
    that take just as long as the rsh calls.

    As for name resolution, the Solaris box uses dns, and so does FreeBSD.
    Both have some entries in the hosts file.

    -John

    On Wed, 31 Dec 2003, Matthew Seaman wrote:

    > On Tue, Dec 30, 2003 at 11:42:41PM -0500, John Von Essen wrote:
    > >
    > > I have a Solaris 2.6 box that has been sending data to a Solaris 8 box
    > > via rsh and rcp.
    > >
    > > I finally changed the Solaris 8 box to a FreeBSD 4.9-STABLE machine.
    > >
    > > Unfortunately, I am noticing alot of problems with my rsh and rcp
    > > calls. Again, the rsh/rcp calls are being initiated on my Solaris 2.6
    > > and are hitting a FreeBSD 4.9-STABLE box.
    > >
    > > Here is what happens:
    > >
    > > My first rsh works, but if I try another rsh within a few seconds it
    > > takes a really long time (30 - 60 sec) to return - but it does return
    > > successful. If I issue my rsh calls every 2 minutes, it returns quick
    > > everytime. But if I do rsh calls to close together (5 sec delays) they
    > > hang for a long time.
    >
    > Now that is weird. 30-60 second delay sounds like classic DNS
    > breakage, but in that case you'ld see it the first time you connected
    > and probably subsequent times.
    >
    > How are you doing name resolution on this system -- host files, NIS,
    > DNS, something else? Are you using Kerberos at all? Does toggling
    > the use of the '-D' and '-n' flags in inetd.conf on the FreeBSD side
    > make any difference?
    >
    > Hmmm... does this happen all of the time, or do you get a grace period
    > of a few minutes immediately after rebooting the FreeBSD box? Are you
    > perhaps ending up with an awful lot of connections sitting in
    > CLOSE_WAIT stage on the FBSD box?
    >
    > > The rcp behaves the same way - but with an added oddity... I can't seem
    > > to 'rcp -r' directories. For example, say I have /tmp/test and in there
    > > I have three files (a, b, and c.). When I try to rcp -r that directory,
    > > I get the following:
    > >
    > > # rcp -r /tmp/test host:/tmp
    > > rcp: /tmp/test/a/b: Not a directory
    > > rcp: /tmp/test/a/b/c: Not a directory
    > >
    > > Very weird!
    >
    > Does saying:
    >
    > # rcp -r /tmp/test host:/tmp/
    >
    > (note the trailing '/') make a difference? This is by analogy to
    > cp(1) where trailing slashes do have a similar sort of effect -- I
    > think that's a feature of BSD-ish Unices but not SysV-ish flavours.
    >
    > > Anyone have any ideas? If I can't get this resolved I am going to have
    > > to go back to the old SUN to SUN setup and scrap the FreeBSD machine.
    >
    > rcp(1) and rsh(1) are really considered as legacy stuff on FreeBSD
    > nowadays. Most people will strongly advise you to use ssh(1) and
    > scp(1) instead -- those are standard on Solaris 9 but you'll have to
    > compile yourself up a copy on Solaris 2.6. You can use key based
    > authentication with ssh-agent(1) in order to avoid having to put in
    > passwords all the time: see the SSH FAQ at
    >
    > http://www.snailbook.com/faq/no-passphrase.auto.html
    >
    > Note too that sshd(8) under FreeBSD disallows root access by default,
    > but there's a pretty obvious control in the /etc/ssh/sshd.conf config
    > file.
    >
    > Cheers,
    >
    > Matthew
    >
    > --
    > Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
    > Savill Way
    > PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
    > Tel: +44 1628 476614 Bucks., SL7 1TH UK
    >

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Kevin D. Kinsey, DaleCo, S.P.: "Re: firewall question..."

    Relevant Pages

    • Re: rsh and rcp problems between Solaris and FreeBSD
      ... > via rsh and rcp. ... the rsh/rcp calls are being initiated on my Solaris 2.6 ... > and are hitting a FreeBSD 4.9-STABLE box. ...
      (freebsd-questions)
    • rsh and rcp problems between Solaris and FreeBSD
      ... I have a Solaris 2.6 box that has been sending data to a Solaris 8 box ... I finally changed the Solaris 8 box to a FreeBSD 4.9-STABLE machine. ... I am noticing alot of problems with my rsh and rcp ...
      (freebsd-questions)
    • Re: rsh and rcp problems between Solaris and FreeBSD
      ... > Those connections stay around for awhile, ... > disappear does the next rsh work. ... What flags are you invoking inetdwith on the FreeBSD ... connection limits). ...
      (freebsd-questions)
    • Re: (2) rsh and rcp problems between Solaris and FreeBSD
      ... Apparently, if I do 'rsh -n host cmd' on the Solaris box, ... it no longer hangs, and I can do it back to back indefinitely. ... >> to go back to the old SUN to SUN setup and scrap the FreeBSD machine. ...
      (freebsd-questions)
    • "New" user with a possible ZFS problem
      ... I've been running FreeBSD for about a year or so on my web/mail server, which I only have remote access to. ... After getting a taste of ZFS while trying out OpenSolaris Indiana under VMware, I decided to give FreeBSD's ZFS implementation a try. ... Actually before installing FreeBSD I tried a native OpenSolaris Indiana install briefly, but ended up deciding it's new package system wasn't quite ready for prime time yet. ... then eventually I experienced my first hang. ...
      (freebsd-questions)