GithubHelp home page GithubHelp logo

ampling / scponly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scponly/scponly

0.0 1.0 0.0 947 KB

The scponly pseudo-shell provides a file-transfer only shell for *Nix systems with optional support for using a chrooted environment.

License: Other

Makefile 2.18% Shell 34.76% C 57.06% Roff 6.00%

scponly's Introduction

3debe8e4f1c654a658b48dfdc5c2cf9d
http://sublimation.org/scponly

"scponly" is an alternative 'shell' (of sorts) for system
administrators who would like to provide access to remote users to
both read and write local files without providing any remote
execution privileges.  Functionally, it is best described as a
wrapper to the mostly trusted suite of ssh applications.

A typical usage of scponly is in creating a semi-public account not
unlike the concept of anonymous login for ftp.  This allows an
administrator to share files in the same way an anon ftp setup
would, only employing all the protection that ssh provides.  This is
especially significant if you consider that ftp authentications
traverse public networks in a plaintext format.

Instead of just a single anon user, scponly supports configuring
potentially many users, each of which could be set up to provide
access to distinct directory trees.  Aside from the installation details
(see INSTALL), each of these users would have their default shell in
/etc/passwd set to "/usr/local/sbin/scponly" (or wherever you choose
to install it).  This would mean users with this shell can neither
login interactively nor execute commands remotely.  They can however,
scp files in and out, governed by the usual unix file permissions.

Some Features:
==============

- logging:  scponly logs time, client IP address, username, and the 
actual request to syslog.

- choot: scponly can chroot to the user's home directory (or any 
other directory the user has permissions for), disallowing access 
to the rest of the filesystem.  

- sftp compatibility.  my testing of sftp against an scponly user 
worked great.  this is probably the cleanest and most usable way 
for an scponly user to access files.

- sftp logging: if the ./configure directive 
"--enable-sftp-logging-compat" is used, scponly will support sftp 
logging

- WinSCP 2.0/3.0 compatibility.

- gftp compatibility

- rsync compatibility

- security checks: root login is disallowed (though root
should never be configured to be using scponly as the default shell.)
scponly also checks the ownership of directories before chroot-ing
into them.

How it works: 
============= 
If you were to examine the arguments passed to a shell by sshd upon
opening a remote connection, the structure of the argument vector
invariably looks like this:

<shell name> -c <remote command>

scponly validates remote requests by examining the third argument.  
scponly also verifies the request by disallowing what a normal
shell would interpret as "special characters".  This prevents
someone from piggybacking additional commands onto a valid scp
request.  It may seem that using scponly would prevent using scp to
copy files that really do contain special characters.  However,
copying files with special characters in their names can be
accomplished by using wildcards (which are allowable characters) to
match the filenames.

scponly doesnt do anything to manage read/write permissions.  The
ssh applications already do that just fine.  If you use scponly, be
aware that good old unix file permissions are still doing the work
of protecting your files.


MAY 2002 ADDENDUM:
	I've since discovered that ssh.com's commercial ssh offering 
supports BOTH "dummy users" as well as scponly-ish functionality.  I
have not been able to find any notes on these features, but I did read
that they exist.  I will make a point to include more information later.
It appears that OpenSSH does not yet support these features.  At this time,
I have no plans to end-of-life scponly, though ultimately, I recognize
that scponly should eventually become just a feature of whichever sshd 
you may run.

NOV 2003 ADDENDUM:
	OpenSSH still doesnt support configurable chrooting for users OR
disallowing interactive login.  

NOV 2004 ADDENDUM:
	OpenSSH still doesnt support configurable chrooting for users OR
disallowing interactive login.  

DEC 2005 ADDENDUM:
	OpenSSH still doesnt support configurable chrooting for users OR
disallowing interactive login.  


scponly's People

Contributors

kalebpederson avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.