Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2003 18:12:15 -0500
From:      Charles Swiger <cswiger@mac.com>
To:        Sean Page <Sean.Page@epsb.ca>
Cc:        "'questions@freebsd.org'" <questions@freebsd.org>
Subject:   Re: Strange behavior with scp
Message-ID:  <F6759BEE-29D3-11D8-9FA4-003065ABFD92@mac.com>
In-Reply-To: <DF09779544EFD511A17D0002A587F9D306C9BFD2@EXCHANGE07>
References:  <DF09779544EFD511A17D0002A587F9D306C9BFD2@EXCHANGE07>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 8, 2003, at 5:09 PM, Sean Page wrote:
> When I try to scp a file from said machine, it shows the first line of 
> the
> fortune (the one you see if you, say, log into a shell on the machine) 
> on
> the client end and then it quits. No error is reported in 
> /var/log/messages
> or auth.log and no file is transferred.

scp requires a "clean login", and that message might be causing the SSH 
protocol used by scp to break.  In particular, something like: "ssh 
_machine_ true" should run /bin/true and return without generating any 
additional output.

Depending on the shell you use, wrapping the invocation of fortune in 
something like:

   if ($?prompt) then
     # interactive CSH commands...
   endif

...or:

   case $- in *i*)
	# interactive SH commands.
   esac

...should resolve this issue.

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F6759BEE-29D3-11D8-9FA4-003065ABFD92>