Re: Pscp - Protocol Error: Unexpected newline

From: JonB (
Date: 12/06/02

From: (JonB)
Date: 6 Dec 2002 08:55:38 -0800

Darren Dunham <> wrote:

> Does your account on the freebsd server send output when you log in?
> The account needs to not echo anything from the .profile or .login (or
> .cshrc) on scp connections...

Darren, thanks for the reply. I'm too new at this; I'm not
understanding what you are saying. How can I make sure none of the
.profile or .login junk is echoed on scp connections?

If I log in with putty I get a fairly normal looking login:

login as: USER
Sent username "USER"
USER@server.tld's password: (I enter it)

( then a "welcome" message is displayed - fairly large )

The putty event log looks fairly boring as it works its way to Session

If I use scp -v it all looks fairly boring until here:

debug1: Entering interactive session.
debug1: ssh_session2_setup: id 0
debug1: Sending command: scp -v -f somefile
debug1: channel request 0: exec
debug1: channel 0: open confirm rwindow 0 rmax 32768
mesg: ttyname: Operation not supported
protocol error: unexpected <newline>

If I pscp -v I get:

c:\blah> pscp -v USER@server.tld:somefile somefile.txt
Looking up host "server.tld"
Connecting to x.x.x.x port 22
Server version: SSH-1.99-OpenSSH_3.4p1 FreeBSD-20020702
We claim version: SSH-1.5-PuTTY-Release-0.53b
Using SSH protocol version 1
Received public keys
Host key fingerprint is:
   1024 blah blah blah
Encrypted session key
Using 3DES encryption
Trying to enable encryption...
Sent username "USER"
User@server.tld's password: (I type it in here)
Sending password with camouflage packets
Sent password
Authentication successful
Started session
Connected to server.tld

mesg: Fatal: Protocol error: Unexpected newline
Sent EOF message

Thanks for your help. Any ideas what I can do to track this down.
The odd part is WinSCP works.