[scponly] failed: /usr/libexec/openssh/sftp-server with error No such file or directory(2)
Peter Weil
plweil at wisc.edu
Mon Mar 10 17:08:22 EDT 2008
I've done about a half dozen scponly installs, but not for over a
year. I'm getting this error when I try to connect for my test user
(this is from the secure log):
Mar 10 15:52:27 ruby scponly[29117]: failed: /usr/libexec/openssh/sftp-
server with error No such file or directory(2) (username:
kahewson(509), IP/port: 144.92.105.153 49501 22)
sftp-server does exist in the chroot directory (and the path is
correct), and I think all of the permissions are correct. I pretty
much copied what I have from a previous install, and can't find any
differences. I also added /dev/null to the chrott directory.
I also did an strace, which, while largely unreadable, did mention
some missing files, such as /etc/localhost. I found this odd, as my
previous installs (which work) don't have these files. I copied them
over the the chroot directory any, but it didn't help. I still suspect
that has something to do with the sftp-server file, or a typo
somewhere, but I'm running out of ideas.
The only difference I can see between installs is that the new one
(both are on Fedora) installed scponlyc in /usr/local/sbin instead of /
usr/sbin -- I don't know why this was the case, but I don't see why it
would make much difference as long as I point to the correct path in /
etc/shells and in /etc/passwd.
Does anyone else have any suggestions? I suspect that this is not an
uncommon problem, but I haven't been able to find the right answers yet.
Thanks, Peter
------------------------------
Here is the complete secure log entry for a failed login:
Mar 10 15:52:27 ruby sshd[29114]: Accepted password for kahewson from
144.92.105.153 port 49501 ssh2
Mar 10 15:52:27 ruby sshd[29114]: pam_unix(sshd:session): session
opened for user kahewson by (uid=0)
Mar 10 15:52:27 ruby sshd[29116]: subsystem request for sftp
Mar 10 15:52:27 ruby scponly[29117]: chrooted binary in place, will
chroot()
Mar 10 15:52:27 ruby scponly[29117]: 3 arguments in total.
Mar 10 15:52:27 ruby scponly[29117]: arg 0 is scponlyc
Mar 10 15:52:27 ruby scponly[29117]: arg 1 is -c
Mar 10 15:52:27 ruby scponly[29117]: arg 2 is /usr/libexec/openssh/
sftp-server
Mar 10 15:52:27 ruby scponly[29117]: opened log at LOG_AUTHPRIV, opts
0x00000029
Mar 10 15:52:27 ruby scponly[29117]: determined USER is "kahewson"
from environment
Mar 10 15:52:27 ruby scponly[29117]: retrieved home directory of "/
altroot//home/kahewson" for user "kahewson"
Mar 10 15:52:27 ruby scponly[29117]: Setting homedir to /home/kahewson
Mar 10 15:52:27 ruby scponly[29117]: chrooting to dir: "/altroot"
Mar 10 15:52:27 ruby scponly[29117]: chdiring to dir: "/home/kahewson"
Mar 10 15:52:27 ruby scponly[29117]: setting uid to 509
Mar 10 15:52:27 ruby scponly[29117]: processing request: "/usr/libexec/
openssh/sftp-server"
Mar 10 15:52:27 ruby scponly[29117]: Using getopt processing for cmd /
usr/libexec/openssh/sftp-server (username: kahewson(509), IP/port:
144.92.105.153 49501 22)
Mar 10 15:52:27 ruby scponly[29117]: running: /usr/libexec/openssh/
sftp-server (username: kahewson(509), IP/port: 144.92.105.153 49501 22)
Mar 10 15:52:27 ruby scponly[29117]: about to exec "/usr/libexec/
openssh/sftp-server" (username: kahewson(509), IP/port: 144.92.105.153
49501 22)
Mar 10 15:52:27 ruby scponly[29117]: failed: /usr/libexec/openssh/sftp-
server with error No such file or directory(2) (username:
kahewson(509), IP/port: 144.92.105.153 49501 22)
Mar 10 15:52:27 ruby sshd[29114]: pam_unix(sshd:session): session
closed for user kahewson
--
Peter Weil, Web Developer
University Communications
University of Wisconsin-Madison
Phone: 608-262-6538
Email: plweil at wisc.edu
More information about the scponly
mailing list