How to restrict user to sftp usage?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to restrict user to sftp usage?
# 8  
Old 07-31-2007
OK...

I have created a user and edited his ".profile"

like this:
Code:
/bin/sftp USER@DEST_SERVER
exit

that way the user does not get a shell

the only problem here is that he'll need to enter a password...
how can i cancel the need for password in sftp?

thanx.
# 9  
Old 07-31-2007
You can setup corresponding public/private keys, and the sftp command would look roughly like this :
Code:
/bin/sftp -oIdentityFile=/path/to/key/id_rsa user@host

# 10  
Old 08-01-2007
Thank you all i solved it with your help!
# 11  
Old 02-04-2008
Need to configure SFTP with users restricted very tightly

Hi
I Need to configure SFTP with users restricted very tightly.. for this i am trying chroot jail. But still user can go to other dircetory...

My user as below..

test1:x:101123:81::/var/tmp/pradeep/chroot/./pra/test1:/bin/sh

can anybody help me to setup chrrot jail that allow sftp only..
# 12  
Old 02-04-2008
Posting at the bottom of a concluded thread is probably not the best way to go.
Try: http://sublimation.org/scponly/
# 13  
Old 02-04-2008
You can keep shell as /bin/nologin for that user so wont be able to login to system. I guess this is what your actual purpose.
# 14  
Old 02-06-2008
No still not able allow only sftp to user home directory only

Quote:
Originally Posted by ynilesh
You can keep shell as /bin/nologin for that user so wont be able to login to system. I guess this is what your actual purpose.
Hi,

That is not working...


I tried to setup chrrot jail for sftp for the help of below link.. but still user can go to another directory.. I want to restrict user to their home directory only...


chroot sshd/sftp
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How can i restrict user high cpu usage?

HI In my M5000 , one of domain is having SAp installed. from today onwards we are facing some stange issue. when we start SAP application, that particular user is taking 95 % of system CP and renaming 5 % is taken by system . because of this reason application is slow. i have 4 CPU(32... (4 Replies)
Discussion started by: bentech4u
4 Replies

2. AIX

How to restrict user to a particular directory?

hi, I want to restrict some user access to only 1 directory (including all sub-directories/files in it). can you please explain me, how can we do this? example; Filesystem GB blocks Used Free %Used Mounted on /dev/hd4 2.61 1.02 1.59 40% / /dev/hd2 ... (7 Replies)
Discussion started by: aaron8667
7 Replies

3. UNIX for Dummies Questions & Answers

Memory usage per user,percent usage,sytem time in ksh

Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies

4. Shell Programming and Scripting

How to restrict ssh by forced commands but sftp login should be enabled?

Hi, I am trying to restrict an ssh-user to execute unwanted commands using ssh from a remote host a. So for that I am using the forced command in the authorized_keys file that will allow the ssh-user to only execute a particular command. If I did not set this, I am able to login via ssh and... (2 Replies)
Discussion started by: Anil George
2 Replies

5. Red Hat

Restrict user access

Hi there I have an application user on my system that wants accesses to these file systems as such: rwx: /SAPO /SAPS12 /R3_888 /R3_888B /R3_888F /R3_888R r: /usr/sap these are the existing FS permissions:ownerships: # ls -ld /SAPO (9 Replies)
Discussion started by: hedkandi
9 Replies

6. UNIX for Dummies Questions & Answers

Restrict user access.

Hi All, How can we restrict a particular user access to a particular shell in solaris 10. Thanks in Advance. (5 Replies)
Discussion started by: rama krishna
5 Replies

7. Red Hat

Restrict user to a particular directory

Hi I have a Fedora10 server and i need a particular user to view files only in a particular folder. All other files in other folders having "read" permission for all shouldn't be accessible to this user. Please let me know if ther's a way. Thanks, HG (5 Replies)
Discussion started by: Hari_Ganesh
5 Replies

8. UNIX for Dummies Questions & Answers

Restrict command for an user ?

Hi everyone ! I got "viewer" and "root" user on a *nix computer. When i log in using "viewer" I only can use "df" command. When I try another command like "ls" it say : -bash: ls: command not found I checked permission of "/bin/ls" file, it has excute permission for everyone. Inside home... (4 Replies)
Discussion started by: camus
4 Replies

9. Solaris

restrict a user to certain command

Hi all, I am using Sun OS 5.10. I am new to Unix. Is there some way to restrict a specific user to certain command say "/usr/bin/more" ?? for example: I want that user1 can execute more command & user2 can't. Can we somehow edit .profile file in the home directory of user to achieve... (1 Reply)
Discussion started by: vikas027
1 Replies

10. UNIX for Advanced & Expert Users

how to restrict memory usage by a process

we are running red hat ES4 and i would like to know if there is anyway of restrcting the maximum amount of memory that a process can get? I have a single preocess that is taking >13GB. Thanks, Frank (4 Replies)
Discussion started by: frankkahle
4 Replies
Login or Register to Ask a Question