HowTo Disable execution of commands whit ssh and scp/sftp

Richard Welty rwelty at averillpark.net
Thu Mar 11 21:10:47 UTC 2004


On Thu, 11 Mar 2004 20:54:50 +0000 John Haxby <jch at thehaxbys.co.uk> wrote:

> Dario Lesca wrote:

> >Hi, someone know howto disable the execution of any command via ssh and
> >disable the scp/sftp service?

> >OK; ssh user at host 
> >NO: ssh user at host cat /etc/passwd
> >NO: scp user at host:/etc/passwd /tmp
> >NO: sftp user at host

> Apart from sftp (which as someone else said), the short answer is "no".
...
> However, as someone else suggested.   There is another way.   A chrooted 
> environment (like the one used for anonymous ftp) will lock a user into 
> a limited environment.

a lot depends on what the goal is. if you are trying to provide a
restricted file transfer environment, you should look at running
rssh inside a chroot environment:

http://www.pizzashack.org/rssh/index.shtml

i have it running at a client's site, and it's working out quite
nicely.

richard
-- 
Richard Welty                                         rwelty at averillpark.net
Averill Park Networking                                         518-573-7592
    Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security





More information about the users mailing list