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: Error using command line

@Guest: Thanks for sharing your solution. Though that's just a workaround for a misconfigured server. You should get the server fixed instead.
Guest

Re: Error using command line

Even though very old thread, many people are looking for the answer, including me. My issue was sorted out by updating the Shell to /bin/sh in advanced options and resolved the issue.
martin

Re: Error using command line

@sobreiro: I do not think you get an answer from an anonymous user who posted 12 years ago.

Please read how to troubleshoot problems with WinSCP. If it turns out that you are not able to help yourself, read how to ask for support or report bugs efficiently, so others can help you.
sobreiro

Re: Error using command line

Hi,

What was the change? .. I am facing same problem.. can you help me?
martin

Re: Error using command line

Please read documentation for common reasons of getting this error and some resolution hints.
Guest

Re: Error using command line

Thanks for your answer. I've changed the way I was running the command. Now, I've created a script that worked perfectly.
I'm very happy with it. WinSCP will very useful for me.

Thanks,

Pablo Szajt
martin

Re: Error using command line

This typically happens when the SSH server cannot run the shell. Either because it cannot find it or more commonly, because you are not allowed to do so. Check the server's log for more details.
pszajt

Error using command line

Hi,
I'm new on this forum and using WinSCP.
I'm trying to automate a copy between a Windows box and a Unix server.
I guess I'm missing something.
I typed the following command on my Windows box:
winscp scp://root@server_name

and received the following messages:
Searching for host...

Connecting to host...
Authenticating...
Using username "root".
Using keyboard-interactive authentication.
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Connection has been unexpectedly closed. Server sent command exit status 1.
Error detecting variable containing return code of last command.

And that's it.
Any ideas?

Thanks in advance,
Pablo