0

WinSCP 5.5.3 (build 4214) CentOS GNU/Linux 2.6.32-642.15.1.el6.x86_64 Login configuration: SCP protocol, port 22, everything else is default.

The error: Connection has been unexpectedly closed. Server sent command exit status 254. Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).

getent on the remote Unix server reports that my login shell is indeed /bin/bash, which does exist with perms 755.

I've looked all over the WinSCP help forum for a solution. Nothing there makes any sense - in most cases, I can't even parse the replies to the person having the error.

I tried looking up "scp server status 254", and found a tip here to turn off PAM (in /etc/ssh/sshd_config, set "UsePAM" to "no"). Same error.

What more can I do to diagnose this problem?

  • 4
    it could be that one of your shell profiles is emitting output that's confusing the scp connection; try temporarily moving them aside to see if that affects the problem. – Jeff Schaller May 9 '17 at 15:04
1

Checked with a local sysadmin, and found that there was a security policy in place that limited everyone to three TTYs. Once I closed all but two, WinSCP connected properly.

(I'm now debating whether to ask why a limit on TTYs makes sense, but that's another story.)

(Also, I'd like to know how to find out that this is the limitation, from a "254" error.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.