I am new to WinSCP.
I would like to ask you about WinSCP's limitations and side effects.

This is my current enviroment.
WinSCP Version: 5.9.3
Protocol: SFTP
Target Server: CentOS

I inserted script command in target server to track user operations.
Here is the script command in .bash_profile

script -f /tmp/`date +%Y%m%d_%H%M%S`_$USER.log

That command runs first whenever user's terminal starts opening.

After I inserted the command in target server, I connected target server via WinSCP.

Even WinSCP can be opened, I can't open WinSCP's Terminal.
Please refer here for WinSCP Log about this case.

I found on WinSCP's official site that

WinSCP does not support commands that require terminal emulation or user input.

My understanding is When WinSCP's terminal opens, script command runs in that terminal automatically. After script commands runs, error occurred.
Please refer above link for WinSCP Log.

I executed script command while the command haven't inserted in target server as environment variable. I got error message.
Please refer here for winSCP Log about this case.

May I know the followings...

How does script command concerns with WinSCP's limitation?
What's the effect of script command on WinSCP?

Myo Min Thein

  • What does the command do? Dec 15, 2016 at 10:36
  • script command is used to track user's operations that are executed in linux's terminal. Dec 15, 2016 at 10:47
  • OK, so it starts something like a new shell, right? Dec 15, 2016 at 10:49
  • Yes. When I open winSCP's terminal, it open new shell. And the script command execute for the first time. Dec 15, 2016 at 10:54

1 Answer 1


Your command starts something like a new shell.

That shell ignores a fact that WinSCP started a non-interactive session. In the non-interactive session, the standard shells (bash, etc) do not display prompts. While the script shell does display prompts ([root@orctdbm20 ~]#). WinSCP is not able to cope with that.

A reason, why you cannot execute the command in the Terminal window is different. It's because the command "require ... user input". It's not a simple command that does something and exits. It starts a new interactive session (and expects a user input).

  • Thanks you. So, 'script' command is one of WinSCP's Terminal Limitations, right? Dec 16, 2016 at 3:03
  • In respect to a use in the Terminal window, yes. When using as an initial shell, then it's rather a non-standard behavior of the script, than WinSCP limitation. Dec 16, 2016 at 6:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .