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: Can't use /bin/sh as shell.

donald_williams-dell wrote:

Then why does it work fine with pscp and scp w/o modification?

Because strictly speaking WinSCP is not a SCP client, as:
As the SCP protocol implements file transfers only, WinSCP must use other means to implement the additional functionality (like directory listing). WinSCP uses Unix-like shell commands to do that. This in turn means that when using the SCP protocol, it can connect to servers that run Unix-like or its emulation only


Also quoting Wikipedia SCP article:
As the SCP protocol implements file transfers only, GUI SCP clients are rare, as implementing it requires additional functionality (directory listing at least). For example, WinSCP defaults to the SFTP protocol. Even when operating in SCP mode, clients like WinSCP are typically not pure SCP clients, as they must use other means to implement the additional functionality (like the ls command). This in turn brings platform-dependency problems.


https://en.wikipedia.org/wiki/Secure_copy
donald_williams-dell

Re: Can't use /bin/sh as shell.

martin wrote:

donald_williams-dell wrote:

If I do that, the putty session logs in and then exits.

Then WinSCP cannot work either.

At issue is with SCP, not an interactive SSH login.

Please read the requirements link above.


Then why does it work fine with pscp and scp w/o modification?
martin

Re: Can't use /bin/sh as shell.

donald_williams-dell wrote:

If I do that, the putty session logs in and then exits.

Then WinSCP cannot work either.

At issue is with SCP, not an interactive SSH login.

Please read the requirements link above.
donald_williams-dell

Re: Can't use /bin/sh as shell.

martin wrote:

So what happens, if you ask SSH client to run /bin/sh on startup explicitly (instead of default shell)? For example in PuTTY, you can do this by going to Connection > SSH > Remote command.


If I do that, the putty session logs in and then exits.

At issue is with SCP, not an interactive SSH login.

This is what I can't do with WinSCP, that I can with Linux SCP or Putty PSCP.

c:\Program Files (x86)\PuTTY>pscp c:\upload\fixpool.sh grpadmin@10.126.205.100:.
grpadmin@10.126.205.100's password:
fixpool.sh | 0 kB | 0.8 kB/s | ETA: 00:00:00 | 100%
martin

Re: Can't use /bin/sh as shell.

So what happens, if you ask SSH client to run /bin/sh on startup explicitly (instead of default shell)? For example in PuTTY, you can do this by going to Connection > SSH > Remote command.
donald_williams-dell

Re: Can't use /bin/sh as shell.

martin wrote:

donald_williams-dell wrote:

Not sure how that will help. When you just SSH in, a Command Line Program is called allowing Management of the device. It's not a regular shell prompt.

And that's exactly the reason WinSCP won't work.
See https://winscp.net/eng/docs/requirements#scp


At issue is WinSCP expecting /bin/bash. This device only has /bin/sh. When you try to specifiy /bin/sh it errors. Please see the attached screenshots. Older versions of this devices firmware, had /bin/bash and WinSCP worked fine then.

Using Linux based SCP, or PSCP from putty works fine.
martin

Re: Can't use /bin/sh as shell.

donald_williams-dell wrote:

Not sure how that will help. When you just SSH in, a Command Line Program is called allowing Management of the device. It's not a regular shell prompt.

And that's exactly the reason WinSCP won't work.
See https://winscp.net/eng/docs/requirements#scp
donald_williams-dell

Re: Can't use /bin/sh as shell.

martin wrote:

tomo_dell wrote:

martin wrote:

How does login to your server look like in SSH terminal (e.g. PuTTY)?


I'll get this one (I work with don); I use SecureCRT.

I've meant a regular terminal output, not a log.


Not sure how that will help. When you just SSH in, a Command Line Program is called allowing Management of the device. It's not a regular shell prompt.
martin

Re: Can't use /bin/sh as shell.

tomo_dell wrote:

martin wrote:

How does login to your server look like in SSH terminal (e.g. PuTTY)?


I'll get this one (I work with don); I use SecureCRT.

I've meant a regular terminal output, not a log.
tomo_dell

Re: Can't use /bin/sh as shell.

martin wrote:

How does login to your server look like in SSH terminal (e.g. PuTTY)?


I'll get this one (I work with don); I use SecureCRT.
martin

Re: Can't use /bin/sh as shell.

How does login to your server look like in SSH terminal (e.g. PuTTY)?
donald_williams-dell

Re: Can't use /bin/sh as shell.

martin wrote:

Please attach a full log file showing the problem (using the latest version of WinSCP).


Here you go.

Thanks.
martin

Re: Can't use /bin/sh as shell.

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
donald_williams-dell

Can't use /bin/sh as shell.

The device I'm connecting to does not have /bin/bash. When I specify /bin/sh in the Advanced Site Settings I get the following error:

Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
https://winscp.net/eng/docs/ui_login_scp#shell


WinSCP v5.5.1 and I also tried older revisions as well, 5.2.4.

Client OS: Windows 7. Tried on 64bit and 32bit systems.

Using Linux (RHEL/ubuntu) SCP, Putty SCP, Cygwin SCP, all work fine.

The device uses NetBSD 5.0 for SSH services.




[/img]