scp restriction to particular folder
This is my problem,i need to give some user from other machine to my machine where they can get my data,but i want to give them only one dir where they can download file and i'm trying to use scp to this solution
Code:
[root@malick ~]# ssh -V |
Quote:
If you are giving root level access to other by ssh, then it's equivalent to root level access in local system. So give the remote user an userlevel access permission. Then you can apply restriction on different folder by restricting permission. |
How to block others from ssh to my system as root?
|
Quote:
Just create an user in your system in the name who want to access, or ask to access ssh as a user Code:
#ssh user@<IP of your system> |
Quote:
Code:
So give the remote user an userlevel access permission. Then you can apply restriction on different folder by restricting permission. so my point is i want to give him only one folder other than that nothing |
all the /etc files are owned by root. He can get things but he neither can edit any of the file or put anything there in /etc.
Do you keep data in /etc ? It's only for system configuration file. |
Maybe this howto on chroot jailing ssh users would help.
http://www.howtoforge.com/chrooted_ssh_howto_debian |
Quote:
Quote:
|
Quote:
|
Because you are using the shell or scp, certain files must be available to support the session. The jail needs certain directories copied for the users commands to work.
See the manpage for sshd_config. The last paragraph in the ChrootDirectory section explains that you can do things easier if you only allow sftp, but not ssh or scp. Code:
In the special case when only sftp is used, not ssh nor scp, it is possible to use ChrootDirectory %h or ChrootDirectory /some/path/%u. The file system |
All times are GMT -5. The time now is 05:19 PM. |