sftp only works for root

From: J.A.K.E. (jake1138_at_NO.SPAM.yahoo.com)
Date: 04/05/04

  • Next message: Nico Kadel-Garcia: "Re: sftp only works for root"
    Date: Sun, 4 Apr 2004 18:23:13 -0600
    
    

    I can only get sftp to work for root. I'm running a new install of sshd (on
    Linux)...

    sshd version OpenSSH_3.8p1, OpenSSL 0.9.7d 17 Mar 2004

    If I sftp using a non-root user account, I get the following from sshd -d:

    --snip--
    subsystem request for sftp
    debug1: subsystem: exec() /usr/local/libexec/sftp-server
    debug1: Received SIGCHLD.
    debug1: session_by_pid: pid 4818
    debug1: session_exit_message: session 0 channel 0 pid 4818
    debug1: session_exit_message: release channel 0
    debug1: session_close: session 0 pid 4818
    debug1: channel 0: free: server-session, nchannels 1
    Connection closed by 192.168.33.2
    debug1: do_cleanup
    Closing connection to 192.168.33.2

    So it appears that the user is unable to launch sftp-server, but if I ssh in
    as that user, that user has no problem running
    /usr/local/libexec/sftp-server. The folder and parent folders all have 755
    permissions. If I make sftp-server suid root, then it works, but then of
    course that user can do anything root can do, so that's not a viable
    solution. Also, there is nothing in the login for that user that will echo
    anything to the screen (in other words, it has passed the "ssh
    user@localhost /usr/bin/true" test). And another thing I tried was setting
    "UsePrivilegeSeparation no" and restarting sshd and that didn't make any
    difference either.

    I've searched the net and the newsgroups and I cannot find the solution.
    Anyone have any idea what is going wrong here?

    SSH RESOURCES (in case they help somebody):
    http://www.openssh.com/faq.html
    http://www.snailbook.com/faq/

    -- 
    Jason
    [ jake1138 AT yahoo DOT com ]
    

  • Next message: Nico Kadel-Garcia: "Re: sftp only works for root"

    Relevant Pages

    • RE: sftp-server on solaris8
      ... root is allowed to connect. ... > I am having a problem trying to use sftp over sshd on solaris8. ... $>whoami: Carl Holtje ...
      (SSH)
    • Re: Enabling SFTP under Debian 4.0r0
      ... ssh works for a normal user but not for root, sftp doesn't work for either. ... Unless you guys have a suggestion that'll let me run root commands as a normal user I kinda have to. ... debug1: Connection established. ...
      (Debian-User)
    • Re: McAfee and CygWin SSH
      ... Try it with sshd -d and see what it says -- perhaps something is ... debug1: sshd version OpenSSH_4.3p2 ... debug1: read PEM private key done: type RSA ...
      (comp.security.ssh)
    • Re: sftp connection closing immediatly after opening.
      ... and can sftp to the Linux box if no user name is supplied. ... debug1: Connecting to server.com port 22. ... Public-key authentication makes things ... Brainbench MVP for Linux Admin / mail: ...
      (comp.os.linux.misc)
    • Re: Cant login to an OS X box using ssh
      ... using sshd -d which seems to be more helpful than ssh -d5 or any level ... verbose mode on the client side. ... debug1: read PEM private key done: type RSA ... SSH Secure Shell ...
      (comp.security.ssh)