Solved

Restricting user to home directory when using SFTP

Posted on 2004-09-10
8
1,546 Views
Last Modified: 2013-12-27
I have SSH working on server and using WINSCP on XP as a GUI secure ftp utility. Want to be able to set up a login name that cannot be used as a normal login (ie no shell) but want that user to be used for sftp. However, the user should not be able to navigate away from his home directory on the server for file transfers. Server is Solaris 8

Thanks
0
Comment
Question by:cjshepherd
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 18

Expert Comment

by:liddler
Comment Utility
There is a chroot patch for ssh, but it's not supported by Openssh team, take a look at http://www.google.com/search?q=chroot+sftp
There is also rssh - http://sourceforge.net/projects/rssh/
0
 

Author Comment

by:cjshepherd
Comment Utility
Don't really want to put an unsupported patch on.

Downloaded and compiled rssh. Used that as the ftp users "shell" in /etc/passwd but get a message
"unable to initialise SFTP" when I try to use sftp.

Could not find much documentation on the usage of rssh - am I doing something wrong?
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
hmm, did this once, but it was a long time ago, looking at the script, I used scp rather than sftp, maybe I couldn't get that to work..?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 38

Expert Comment

by:yuzh
Comment Utility
0
 

Author Comment

by:cjshepherd
Comment Utility
scponly - not on-site at present but tried this last week but got errors when I tried to compileit - found error or line 3 or 5

chroot - loks as if this replaces the OpenSSH which I don't reallt want to do. Also looks as if its all or nothing ie all ssh shels will be restricted

rksh - had already set this up but does not work with sftp
0
 
LVL 38

Expert Comment

by:yuzh
Comment Utility
>>>scponly - not on-site at present but tried this last week but got errors when I tried to compileit - found error or line 3 or 5.

Do you have a working C complier installed on your system (eg, GNU gcc  etc), if not
you can download it from:
http://sunfreeware.com/

If you are sure that you C compiler is ok then, you can send an email to scponly
mail-list to see if you can get a patch to fix it.

also have a look at:

https://lists.ccs.neu.edu/pipermail/scponly/2002-November/000160.html

Good luck!
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
Comment Utility
PAQed - no points refunded (of 125)

Computer101
E-E Admin
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now