Re: Allowing scp access only

From: Jochen Czemmel (jochen.czemmel@gmx.de)
Date: 02/17/03


From: jochen.czemmel@gmx.de (Jochen Czemmel)
Date: 17 Feb 2003 02:42:47 -0800

Hi John!

Perhaps you could use a shell script as a forced command that is specified
in the file 'authorized_keys'. The shell script could check the automatic
Variable 'SSH_ORIGINAL_COMMAND', which is something like
'/usr/local/bin/sftp-server' when the users connects with sftp. Just
call that executable again if this was the command, and exit for all other
commands. This way it is not possible to execute other commands or log in
interactively. Make sure that the user can not change the file
~/.ssh/authorized_keys using sftp commands !

Regards

   Jochen

John Hetherington <john.hetherington@havonix.co.uk> wrote in message news:<qGq%9.151$u13.599@news13-win.server.ntlworld.com>...
> Is it possible to disable ssh access and only allow scp access. It is for an
> upload facility so we don't want to provide shell acess.
> TIA.
> -- John Hetherington.



Relevant Pages

  • Re: Great SWT Program
    ... to unite temporarily against their common enemy -- me? ... the manual to write a shell script, oops, .bat file. ... (It lists all commands whose ...
    (comp.lang.java.programmer)
  • Re: wc returned number and "command not found"
    ... That should work (if "tmp" is a file). ... paths is both a nightmare and make the shell script clumsy. ... execute the commands interactively, none of the commands require full path ...
    (comp.unix.shell)
  • Re: Sysinstall does not install GENERIC kernel
    ... But except of this a problem I found a new trouble: system commands ... think that the best way to customize your jumpstart installation is ... You could then put all your command in the "post" shell script of this ... #+ Nvidia (driver "nv") ...
    (freebsd-questions)
  • Re: pipe(), fork(), dup2(), exec(), .. Interprocess communication in C++ on UNIX.
    ... use rcpy to copy over a shell script, the use rcmd to run that script ... > Because I need to execute more commands in one session. ...
    (comp.unix.programmer)
  • /bin/ksh not found
    ... I am getting the following error "/bin/ksh not found" when I execute a ... simple shell script. ... a few commands, so please keep in layman terms. ...
    (comp.unix.misc)