SCPONLY(8)
π scponly(8) β the manual page, but make it make sense
okay bestie, welcome to scponly(8). yes that's the whole title. it's a section-8 sysadmin page and it's lowkey iconic, let's go π«Ά
πΈ NAME πΈ
scponly β a very limited shell made for secure file transfers, that's the whole vibe β¨
π SYNOPSIS π
scponly
that's literally it. no flags, no args, no drama. main character entry, zero notes π
π¦ DESCRIPTION π¦
okay so picture this: you're a sysadmin and you want to let remote users read and write local files, but you do not want to hand them remote execution privileges. scponly is that girl. it's an alternative "shell" (and yes, the original page puts "shell" in quotes too, because it's a shell in a trench coat) for exactly this situation. functionally, the cleanest way to describe it is: it's a wrapper around the trusted suite of ssh applications. that's it, that's the whole job π«Ά
the classic scponly usage is making a semi-public account β think of it like the whole "anonymous login" concept for ftp, but make it ssh. an admin can share files the same way an anonymous ftp setup would, except you get to use all the protection that ssh provides. and ngl this matters, because ftp authentications traverse public networks in a plaintext format. we don't do that here π
and it's not just one single anonymous user either β scponly supports configuring potentially many users, and each one of those users could be set up to give access to distinct directory trees. obsessed. aside from the installation details, each of these users would have their default shell in /etc/passwd set to "/usr/local/bin/scponly" (or wherever you choose to install it, no pressure). what that means: users with this shell can neither log in interactively nor execute commands remotely. what they can do is scp files in and out, governed by the usual Unixish file permissions. slay π
β¨ FEATURES β¨
- Logging:
scponlylogs the time, the client IP address, the username, and the actual request β all to syslog. receipts, always π§Ύπ - chroot:
scponlycan chroot to the user's home directory (or any other directory the user has permissions for), disallowing access to the rest of the filesystem. locked in, literally π - sftp compatibility: the author's own testing of
sftpagainst anscponlyuser "worked great." this is probably the cleanest and most usable way for anscponlyuser to access files. we stan a clean interface π¦ - Security checks: root login is disallowed β though let's be so fr, root should never be configured to be using
scponlyas the default shell anyway π - WinSCP 2.0 compatibility:
scponlycan be compiled in WinSCP compatibility mode, which will permit a "semi-interactive" shell that WinSCP can use. teamwork π - gftp compatibility:
scponlyis compatible with gftp if you set"use ssh2 sftp subsys"in your gftp options. one little setting, that's it β¨
and a big heads up bestie: scponly doesn't do anything to manage read/write permissions. the ssh applications already do that just fine, no need for a second opinion. if you use scponly, be aware that good old Unix-style file permissions are still doing the work of protecting your files. periodt π
β NOTES β
- as recent as June 26, 2002, vulnerabilities have been discovered in OpenSSH. there is also a SSH1 protocol vulnerability. so if you're going to use
scponly, be aware it is no more secure than the ssh installation it runs on. like, it's a wrapper, not a suit of armor, y'know? π - the author has since discovered that ssh.com's commercial ssh offering supports BOTH "dummy users" and functionality paralleling
scponly. there are no notes findable on these features, but the author did read that they exist, and will make a point to include more information later. it appears OpenSSH does not yet support these features. at this time the author has no plans to end-of-lifescponly, though ultimately β and this is real β they recognize thatscponlyshould eventually become just a feature of whicheversshdyou may run. growth π±
π FILES π
/usr/local/bin/scponlyβ the default location for the shell itself. home base π/usr/local/sbin/scponlycβ the default location for the chrooted version ofscponly. the sequel π₯/etc/shellsβ to be a proper shell, it has to be included here. no invite, no party π
π SEE ALSO π
chroot(2), ssh(1), scp(1), sftp(1), shells(5), sshd(8).
π AUTHORS π
Joe Boyle <joe@sublimation.org>.
π LEGALITIES π
Copyright (C) 2001, 2002, 2003 Joe Boyle <joe@sublimation.org>.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
like yes it's all caps, that's just how lawyers type. read it, it's real π«Ά
π BUGS π
versions prior to 2.4 have a vulnerability wherein the .ssh/environment file can be used to override the $PATH and $LD_LIBRARY_PATH vars, compromising the shell. so if you're on something ancient, please upgrade, i'm begging π
and that's the page!! originally dated Sept 03, 2002, and it's scponly(8) β a whole little legend. go forth and scp responsibly π
β¨π
π¦ where this page comes from
- arch rolling: scponly 4.8-12 Β· custom
- nixos 26.05: scponly 4.8
- nixpkgs unstable: scponly 4.8
- Copyright 2001, 2002, 2003 joe@sublimation.org
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms