LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   User account and SSH: I need advices... (http://www.linuxquestions.org/questions/linux-security-4/user-account-and-ssh-i-need-advices-109897/)

Zingaro2002 10-29-2003 08:59 AM

User account and SSH: I need advices...
 
Hi guys! ;)

I have to do the following:

- create a new user on my linux box (red hat 8) that has a public IP

- this user must have access with full privileges (creation, editing, deletion of files and directories) ONLY AND ESCLUSIVELY to a directory that I decide (and that is not his home directory); he must NOT view other directories in any way

- moreover each time this user connect from his win machine to my linux machine using SSH (with user name and password) he can access ONLY AND ESCLUSIVELY the directory I assigned to him (I repeat: not his home).

How can I do this?
How can I configure sshd to obtain what I want?

How can I configure sshd to let ONLY some users (NOT root) connect to my machine?

Thanks in advance to anyone who can give me help...

:) :)

toovato 10-29-2003 09:36 AM

so this user just needs to dump files?

consider sftp with ssh

when using the utility create user you can create their home directory anywhere

Zingaro2002 10-29-2003 09:59 AM

Quote:

Originally posted by toovato
so this user just needs to dump files?

consider sftp with ssh

when using the utility create user you can create their home directory anywhere

Yes, that is just what I want to do!

I will do

adduser -d /home/xxx/zzz/username username

but, which options should I specify to let the user access, view, modify or delete only files and subdirectories ONLY in his home directory?

He must have no access to any other directory-files-device on my linux box.

Any suggestion?
Bye:) :)

toovato 10-29-2003 10:04 AM

Please explain your motivation - what do you want him not to see?

The way to make his access as limited as possible is to put his user on his own group. But if all this user needs to do is to ftp then I would suggest some other seperate server software to control his access that doesnt give the user a shell.

Zingaro2002 10-29-2003 10:18 AM

Uhmm...

Maybe there is something that I don't know...

My user will use only sftp.

Is it possible to create a user only for sftp?
How can I make it?

Or should I create a linux user with only the privileges I mentioned above?

toovato 10-29-2003 10:35 AM

well you can grab a web app that allows uploads and downloads over https and auth_digest or something similiar. My point being if you don't trust this person at all and you have senesitive data on the machine giving this person access to openssh in any regard is probably not a good idea. There are also other ftp servers that are "secure", whereby you can limit all access to a particular directory..

chort 10-29-2003 12:27 PM

There's actually a project, I think on Sourceforge, for "sftp-only" accounts. Basically it's the same idea as having a "nologin" shell, accept they must be able to authenticate as the user for SFTP, but you don't want them to be able to SSH into the machine.

I wish I had the link to it off the top of my head, but 2 minutes on Google should dig it up.

unSpawn 10-29-2003 01:09 PM

From the FAQ: Security references thread:

OpenSSH for chrooted sessions on Linux: http://mail.incredimail.com/howto/openssh/
http://chrootssh.sourceforge.net

OpenSSH, Scponly: http://www.sublimation.org/scponly/
Using scponly for secure file transfers: http://www.sancho2k.net/filemgmt_dat...s/scponly.html
OpenSSH, Rssh: http://pizzashack.org/rssh/

Robert0380 10-31-2003 04:50 AM

couldnt he chroot the users home directory so that the user only sees his home and whatever he creates in it?


ok i think that's what UnSpawns links are about but i started typing this so im gonna post it anyway.


All times are GMT -5. The time now is 05:58 PM.