Post a reply

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

Guest191

WinSCP Auto Logging Out

Switching from SFTP to SCP worked for me as well. Thanks!
rex

That did it for me too – I changed my script from sftp:// to scp:// and it works. Thank you!
sarthak3.mishra@capgemini

COOL

It worked for me also. Thanks
Guest

Also worked for me. Many thanks!
linux guy

worked for me too thx

worked for me too thx
Siva123

Thanks - Worked

I changed my script from sftp:// to scp:// and it works. Thank you!
stephan.uzzell

Thank you!

Martin,

That did it – I changed my script from sftp:// to scp:// and it works. Thank you!

stephan
martin

Re: Server sent command exit status 127

In GUI, your actually use SCP protocol. While you have SFTP protocol selected seemingly, you also have SCP fallback enabled. As your server does not seem to allow SFTP, WinSCP GUI falls back to SCP. In scripting, the fallback is not enabled, so WinSCP fails. Use SCP instead (scp://) or fix your server to allow SFTP.
stephan.uzzell

Logs

OK, I figured out the problem with the log syntax. I've generated logs for both CLI and GUI, but not sure I know what the difference between the two is.

Thanks,
stephan
stephan.uzzell

Server sent command exit status 127

I've been working on a project that includes using WinSCP to sftp a file to a Linux host. It had been working initially, but something has changed somewhere (OS level I suppose) and now it isn't. I know that isn't much to work with, but I am hoping I can get some troubleshooting tips.

I've been using the syntax
WinSCP.exe /console /command "open sftp://oracle:<PASSWORD>@ENLIHGP03ODB01 -hostkey=*"

I get the onscreen output:

Searching for host...
Connecting to host...
Authenticating...
Using username "oracle".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Connection has been unexpectedly closed. Server sent command exit status 127.
Cannot initialize SFTP protocol. Is the host running a SFTP server?

I can connect from the same Windows host to the same Linux host using the WinSCP GUI.

I tried turning on logging by adding the following to my command line call: /log "W:\Install\Private\Oracle\Scripts\Linux\Migration_MMP1\winscp_cmd.log" but I did not get any logfile.

Any advice?

Thanks,
stephan