Re: unable to sftp

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Check that sshd_config has a "subsystem" line that points to a copy of

  Richard Silverman

Re: unable to sftp

Here is the confirmation about sub system in /etc/ssh/sshd_config

# sftp subsystem
Subsystem       sftp    /usr/lib/ssh/sftp-server

#l s -l /usr/lib/ssh/sftp-server
-r-xr-xr-x   1 root     bin        97272 Feb  7  2006

I have restarted the server and sshd but no luck.

Re: unable to sftp

On Tue, 16 Jan 2007 13:24:34 -0800, donkarnash wrote:

Quoted text here. Click to load it

There is a couple of things I don't 'get' about your post.  You say you
installed openssh but the log you show is from Sun's ssh.  Are you running
the correct daemon?  Perhaps you should have run /etc/init.d/openssh start.
If that isn't the issue then one other thing is that you say you ran the
sftp -v sshd@server
but you surely shouldn't be connecting as sshd which is a restricted
account used only to run the sshd daemon.  Any attempts to connect to this
account will surely fail since it doesn't have a valid shell.


Re: unable to sftp

Hi John,

your answer makes sense. I have create sshd with the following command.

useradd -g sshd -c 'sshd privsep' -d /var/empty -s /bin/false sshd

can you suggest me if I need to grant a valid shell to sshd ???

Please let me know. Another thing, I do not have openssh in

I just have sshd.

JohnK wrote:
Quoted text here. Click to load it

Re: unable to sftp

On Tue, 16 Jan 2007 14:32:47 -0800, donkarnash wrote:

Quoted text here. Click to load it

Hi 'donk'

No, don't use the sshd account.  It shouldn't be used for anything except
running the ssh daemon.  Try connecting to another account like your own
or a specially created one with the home directory placed where you want
to transfer files to.
I would *guess* that the openssh excutables have been installed in
/usr/local/bin and /usr/local/sbin.  Look for the sshd executable in
/usr/local/sbin.  You will have to find or write a script to put in
/etc/init.d.  Look at the Sun /etc/init.d/sshd script.  Perhaps you can
copy and amend that one to run openssh.

In the interim you could run
    /etc/init.d/sshd stop
to close the Sun one and run
to start the openssh one. This will run in the background.  Note that you
really should put in an /etc/init.d/openssh script to start the daemon so
that it survives after a reboot.



Site Timeline