Alternative 1:

>> Create a file named sftponly in bin directory:

#!/bin/bash 
if [ "$*" != "-c /bin/sftp-server" ]; then 
echo "SFTP only!" 
exit 1 
fi 
exec $@ 

>> chmod 755 /bin/sftponly from a BASH shell 
>> replace shell /bin/bash with /bin/sftponly  in etc/passwd.

Alternative 2:

http://www.sublimation.org/scponly/

Alternative 3:

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

You may also visit a related discussion thread at 
http://www.itefix.no/phpws/index.php?module=phpwsbb&PHPWSBB_MAN_OP=view&PHPW
S_MAN_ITEMS=206

Rgrds Tev

http://itefix.no
 

> -----Original Message-----
> From: Patrick Morris [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 05, 2006 6:46 PM
> To: 'Mark Holden'; [email protected]
> Subject: RE: openssh: Enabling sftp, but disabling ssh?
> 
> > Does anybody know if it's possible, using openssh, to allow file 
> > transfer to/from a machine, using sftp, for a specific userid, and 
> > disallow ssh login/remote command execution for that same userid? 
> > Other userids on the machine should be unaffected.
> 
> You should be able to set the user to an invalid shell (as 
> long as it's listed in /etc/shells).
> 
> 


Reply via email to