Operating System - HP-UX
1834279 Members
2061 Online
110066 Solutions
New Discussion

scp +sftp only configuration

 
SOLVED
Go to solution
Prashant Zanwar_4
Respected Contributor

scp +sftp only configuration

I have ssh2 installed, what I am able to configure is ssh-dummy-shell and chroot for a user on my host which effectively restricts user to sftp..
I want some way where I can allow user scp/sftp & not ssh shell functions.. is it possible? does some one have it working anywhere?

Thanks and regards
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: scp +sftp only configuration

Shalom Prashant,

If you are using chroot, copy the scp/sftp binaries to each users bin directory, make sure its on the path and you are done.

Effectively, if you can't find ssh, you can't use it. chroot does a good job on that.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Prashant Zanwar_4
Respected Contributor

Re: scp +sftp only configuration

I am sorry, but it works otherwise too.. I tested it & scp shows up fine..
Thanks again
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Tom Ward_1
Honored Contributor

Re: scp +sftp only configuration

Hello Prashant,

If you allow the users to put files in their home directory then there's nothing to stop them from using scp to copy an ssh binary into thier home dir.

I was tempted to offer putting "exit 0" in the .profile file, but with SCP access they can replace it with another one that is not restricted.

Just be sure that the users can't change or add to your secured configuration effectively undoing your restrictions.

Good luck,
Tom
Russ Park
Frequent Advisor

Re: scp +sftp only configuration

Hi,
question for the original poster, or anyone who wishes to reply:

Tru64's ssh implementation includes a file in /bin called "ssh-dummy-shell" but I cannot find an HPUX equivalent on my system with A.4.10 ssh.

How do I configure?

Thanks,

Russ
Ivan Ferreira
Honored Contributor

Re: scp +sftp only configuration

The authorized_keys file has the command="command" option. You could use that option for the user's key to restrict the user.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?