Error using command line

Advertisement

pszajt
Joined:
Posts:
1
Location:
Winnipeg

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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.

Reply with quote

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

Reply with quote

Advertisement

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.

Reply with quote

martin
Site Admin
martin avatar

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.

Reply with quote

Advertisement

You can post new topics in this forum