I have a task to create 3 users that must connect only via sftp on a machine, and must have only read access to a certain directory (thay shouldn;t be able to cd anywhere else)
The problem is that the directory where these users must have access to, it's already created/owned by another user/group which have xw rights there also.
My approach for this was to create the new users into the owner group of the respective directory. Then I configured in /etc/ssh/sshd_config for the users to be chrooted in that directory.
Like this :
the directory where the users have to 'caged' with only read permissions :
The user creation and chroot settings :
I\m not sure exactly what ChrootDirectory %h does but I assume it 'cages' the respective user in his home directory.. ?
My problem is that once the 'ChrootDirectory %h' is in place my user cannot login :
Any ideas how should I approach this?
I have built a website and I can access and edit the website'files on server via the root user. The current file and directory structures are not changeable. Now I am hiring a webpage designer to help me re-design some pages, I am going to let the designer edit the files directly on the server. So... (5 Replies)
Hello,
I've just started using a Solaris machine with SunOS 5.10.
After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init).
... (2 Replies)
Hello Folks,
Of course i came here for your favour :)
How to set a defalult home directory for sFTP login ( at present users land in to their home directrory) when they connect from specific server.
When server(A) sFTP's to Linux server(B) they land to thier home directory.
I want... (5 Replies)
I am running a shell script as user A. In that script I need to execute a sftp that would transfer the file using another user B.
I am using the below command:
sftp -oPort22 B@remote server
However, I am getting password prompts each time.
I have done the following:
Added the public... (4 Replies)
I needed to set up an sftp server for an external user to upload data for an internal developer.
What I did was created a chrooted user for the external guy, and then created an internal group with full permissions to that directory and then made the internal developer a member of that group so... (5 Replies)
Hi,
Im trying to add some validation into my shell script code that basically checks whether a directory exists before SFTP'ing a file to it. If the directory exists then it will add the file, if not then it should return some kind of message. This is the code I have written so far but with no... (1 Reply)
Hi List,
I have set up a chrooted SFTP setup following the instructions I found on tech republic:
/blog/opensource/chroot-users-with-openssh-an-easier-way-to-confine-users-to-their-home-directories/229
I have successfully got it all working and I can download files when logged in via sftp... (0 Replies)
Hi, I need to log the activity of my SFTP (RHEL 5.4).
I have this in /etc/sshd/sshd_config:
Subsystem sftp /usr/libexec/openssh/sftp-server -f LOCAL5 -l VERBOSE
And this in /etc/syslog.conf:
LOCAL5.* /var/log/sftp.log
When I log in... (1 Reply)
Hi,
I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP.
The aim is to... (1 Reply)
Hi,
I want to configure chrooted FTP (not Proftpd) in AIX.
What are the steps to perform this configuration and which and config files in AIX to configure?
Thanks (1 Reply)