Which internal-sftp options are available?

4

3

I had to create a chroot environment in a RHEL 6 box and I used the internal-sftp server of OpenSSH. The following OpenSSH configuration lines are working:

# override default of no subsystems
#Subsystem      sftp    /usr/libexec/openssh/sftp-server
Subsystem       sftp    internal-sftp

Match User jaileduser
  ChrootDirectory %h
  X11Forwarding no
  AllowTcpForwarding no
#  ForceCommand internal-sftp -d /xxx

But, by googling this issue, I realized that internal-sftp has some options, like -d, but I have found no information/help about its options/arguments and their meanings in the manual pages.

Then I downloaded OpenSSH 5.6p1 source code, hoping it would be easy to find those options. But it appears to be harder than I ever thought. I found this in the Changelog file

 - djm@cvs.openbsd.org 2008/08/21 04:09:57
   [session.c]
   allow ForceCommand internal-sftp with arguments. based on patch from
   michael.barabanov AT gmail.com; ok markus@

Do anybody can tell me where I can find this info?

Thanks in advance

Jdamian

Posted 2016-08-18T12:12:38.883

Reputation: 173

Answers

7

The internal-sftp supports the same set of options as the sftp-server:

https://man.openbsd.org/sftp-server

Martin Prikryl

Posted 2016-08-18T12:12:38.883

Reputation: 13 764