sftp with a user defined shell
Ben Lindstrom
mouring at etoh.eviladmin.org
Wed Aug 18 08:31:41 EST 2004
On Tue, 17 Aug 2004, Srinivas Gopaladasu wrote:
>
> Ben Lindstrom wrote:
>
> >There is one major difference in sftp vs ftp.
> >
> >ftp uses the $SHELL as an "allow or disallow" switch. Where as ssh
> >actually calles the user's $SHELL to run sftp-server.
> >
> Can you provide any info, why the difference?
>
Because ftpd listens on 21 directly. Where sftp basicly does 'ssh
site.com sftp-server' (Ignoring details of subsystems to simplify stuff).
Thus it talks to ssh which then runs the sftp-server program.
Same is true for scp.
> >Thus if you have any garabage being displayed during an non-interactive
> >login (Eg output if you run: ssh site.com true) it will stop sftp-server
> >from working correctly.
> >
>
> Any suggestion, how I can solve my problem?
>
As stated:
ssh site.com true
You should get like:
$ ssh site.org true
Enter passphrase for key '/private/home/mouring/.ssh/id_dsa':
$
the below depending on if you have public key setup or not.
$ ssh site.org true
Password:
$
If you get anything else you need to look at your shell startup scripts.
And clean them out.
This was much has already been coverted in http://www.openssh.com/faq.html#2.9
- Ben
More information about the openssh-unix-dev
mailing list