RE: Strange behavior with scp

2003-12-08 Thread Sean Page
HA!
That was it!
Thanks Jonathan.

Sean.

-Original Message-
From: Jonathan T. Sage [mailto:[EMAIL PROTECTED] 
Sent: December 8, 2003 4:02 PM
To: '[EMAIL PROTECTED]'
Subject: Re: Strange behavior with scp


Sean Page wrote:
> Hi,
> 
> I just upgraded 2 machines to 4.9p1 and one of them is displaying a rather
> odd behavior.
> 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.
> Has anyone seen this before? I tried using the same sshd_config as the
> working machine to no avail.
> Any suggestions would be greatly appreciated.
> 
> Thanks,
> Sean.
> 
This is happening because fortune is hijacking the tty.  edit your shell 
init program to not run fortune on non-interactive shells, or remove it 
all together and scp should work fine again.

~j


-- 
"Yesterday upon the stair I saw a man
who wasn't there, he wasn't there
again today, oh how i wish he'd go away"

Rev. Jonathan T. Sage
Lighting / Set Designer
Professional Web Design

[HTTP://theatre.msu.edu]
[EMAIL PROTECTED]
[See Headers for Contact Info]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Strange behavior with scp

2003-12-08 Thread Charles Swiger
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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Strange behavior with scp

2003-12-08 Thread Jonathan T. Sage
Sean Page wrote:
Hi,

I just upgraded 2 machines to 4.9p1 and one of them is displaying a rather
odd behavior.
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.
Has anyone seen this before? I tried using the same sshd_config as the
working machine to no avail.
Any suggestions would be greatly appreciated.
Thanks,
Sean.
This is happening because fortune is hijacking the tty.  edit your shell 
init program to not run fortune on non-interactive shells, or remove it 
all together and scp should work fine again.

~j

--
"Yesterday upon the stair I saw a man
who wasn't there, he wasn't there
again today, oh how i wish he'd go away"
Rev. Jonathan T. Sage
Lighting / Set Designer
Professional Web Design
[HTTP://theatre.msu.edu]
[EMAIL PROTECTED]
[See Headers for Contact Info]


pgp0.pgp
Description: PGP signature