Topic "No shell for SFTP?"

Author Message
No shell for SFTP?

Guest


The SCP/SFTP information page states following for SFTP:
"Unlike SCP, for connection with SSH server, you do not need access to shell. "

How do I make this possible? I tried with different settings on a linux server but I cannot login without a shell configured for the user. Can somebody help me with this, or explain what is meant with the above statement?
Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
By the sentence abouve, I have rather meant, that WinSCP does not require the shell itself. Wrong wording, I'm sorry. It is platform dependent, whether user needs to have shell access to run sftp-server. At least OpenSSH requires shell access for this. But the only thing that the shell do is that it launches sftp-server binary. So you may setup restricted shell, which allows only this. You may also setup forced command associated with private key. This page may also help you.
_________________
Martin Prikryl
Johan

Guest


Thanks, my researches pointed in this direction.

There are two existing good solutions as I see it. Using the rssh shell or scponly shell. Both shells enables scp and sftp only. Rssh seems more secure, but does not allow Winscp to connect in scp mode, only in sftp. The good thing with scponly, they have a nice jail script for chroot.

We have currently a server with scponly installed and it seems running fine. The sftp feature in Winscp is very welcome! Thanks.

Links:
http://rssh.sourceforge.net/
<invalid hyperlink removed by admin>
dbrb2
[View user's profile]

Joined: 2017-10-01
Posts: 1
I know this is an old thread, but I have the same issue and could do with some clarification...

I have used rssh to allow only SCP and SFTP to a server. SFTP weorks fine, as does SCP from a linux box, but using winSCP it fails, with the server logs showing winSCP tried to open a shell and failed.

Any idea what the problem is? Shouldn't SCP work without a shall, as it does from Linux?
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
dbrb2 wrote:
I know this is an old thread, but I have the same issue and could do with some clarification...

I have used rssh to allow only SCP and SFTP to a server. SFTP weorks fine, as does SCP from a linux box, but using winSCP it fails, with the server logs showing winSCP tried to open a shell and failed.

Any idea what the problem is? Shouldn't SCP work without a shall, as it does from Linux?

Please read documentation:
https://winscp.net/eng/docs/requirements#scp

If that does not help, come back.
Guest




Thanks - I had seen that - so the issue is that whilst a shell is not required for an SCP transfer, winSCP requires it because it tries to give a directory listing (which a command line transfer from linux does not) - which it can't do unless a shell is available?

I don't suppose there is any way to configure winSCP to live with file transfer only, in situations where a shell is unavailable?
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
Quote:
Thanks - I had seen that - so the issue is that whilst a shell is not required for an SCP transfer, winSCP requires it because it tries to give a directory listing (which a command line transfer from linux does not) - which it can't do unless a shell is available?

Correct.

Quote:
I don't suppose there is any way to configure winSCP to live with file transfer only, in situations where a shell is unavailable?

What's a point of using GUI SFTP client, if you cannot see the files you work with? How would that even work?
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License