Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: date: illegal option -- c

WinSCP does not execute 'date' command. It is maybe executed from some startup script, like .profile. Check them. From the -c parameter it also looks like 'date' is treated like shell. So check shell box on SCP tab of login dialog whether the 'date' was not entered there by mistake. Also your account may have 'date' set as the default shell. In all cases try SFTP instead of SCP too.
Guest

date: illegal option -- c

I am running version 3.7.1 build 257 of WinSCP3. The server to which I am trying to connect will only accept SCP, all SFTP attempts are refused. From the log file I show that a connection is accepted, but disconnects when trying to do something with the date. The interface is set to Norton Commander and every combination of date settings in the program have been set and unset resulting in the same error. The SCP shell is manually set to /bin/bash. I have also tried version 1 and 2 of the SCP protocol. Searching the message board I found one other post by the author [HEJ] with a similar problem with the -c titled "How to go thru interactive ssh gw." Below is the bottom of my log file. It seems like a "-c" is being sent somehow and is disturbing the connection.


.. Using stored password.

. Sent password
. Access granted
. Opened channel for session
. Started a shell/command
. --------------------------------------------------------------------------
. Using SCP protocol.
. Doing startup conversation with host.
. Skipping host startup message (if any).
> echo "WinSCP: this is end-of-file:0"
! date: illegal option -- c
! usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
!             [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
. Server sent command exit status 1
. All channels closed. Disconnecting
* (ESshFatal) Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
* Connection has been unexpectedly closed. Server sent command exit status 1.