jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Jailkit-users] sftp fails when Jail user tries to login. 'Connectio


From: Richard Scott
Subject: Re: [Jailkit-users] sftp fails when Jail user tries to login. 'Connection Closed'
Date: Mon, 17 Feb 2014 09:32:58 +0000
User-agent: Roundcube Webmail/0.9.5

try changing the shell you use from the default one when adding the jail user i.e.

 -s | --shell= shell    : set shell inside jail (/usr/sbin/jk_lsh default

$ jk_jailuser -j /my/jail -s /bin/bash jailuser

try using /bin/bash (obviously as long as you've coppied it into the Jail.

jk_cp -j /my/jail /bin/bash

Rich

On 16/02/2014 11:13, aravind kamath wrote:



Hi All,
I have tried using Jailkit version 'jailkit-2.15.tar.gz' on Ubuntu as well as SuSE 11.
I am trying to configure this machine as SFTP server where users can login to the Jail and add/del files to it.
 
I followed the instructions in the webpage http://olivier.sessink.nl/jailkit/howtos_sftp_scp_only.html
On both the machines, I am not able to login to the jail with the jail users created.
 
I have followed below set of commands to install and configure Jailkit
  1. cd /opt
  2. sudo gunzip jailkit-2.15.tar.gz
  3. sudo tar -xvf jailkit-2.15.tar
  4. cd jailkit-2.15
  5. sudo ./configure
  6. cat INSTALL.txt
  7. sudo make
  8. sudo make install
  9. sudo cp extra/jailkit /etc/init.d/jailkit
  10. sudo chmod a+x /etc/init.d/jailkit
  11. sudo jk_init -j /opt/sftpjail jk_lsh
  12. sudo jk_init -j /opt/sftpjail sftp
  13. sudo jk_init -j /opt/sftpjail scp
  14. sudo useradd test
  15. sudo jk_jailuser -m -j /opt/sftpjail test
  16. sudo killall jk_socketd
  17. sudo jk_socketd
 
 
I then tried to login locally using below command
sftp address@hidden
Connecting to localhost...
address@hidden's password:
Connection closed
 
Content from jk_lsh.ini
susepc1 etc/jailkit> pwd
/opt/sshd-sftp-chroot/etc/sftpjail
 
susepc1 etc/jailkit> cat jk_lsh.ini
## example for a user
#[test]
paths= /usr/bin, /usr/lib/
executables= /usr/bin/scp, /usr/lib/sftp-server
#allow_word_expansion = 0
#umask = 002
 
#
##example for a group, there should be only 1 space inbetween the words!
#[group users]
#paths = /usr/bin
#executables = /usr/bin/cvs
#allow_word_expansion = 0
#environment= HELIX_PATH=/opt/RealPlayer/, TMP=/tmp/
 
 

The error I see is in /var/log/warn

jk_lsh[6961]: did neither find a section 'test', nor 'group users' nor 'DEFAULT' in configfile /etc/jailkit/jk_lsh.ini

 
I tried to google out a lot to figure out the issue. However it went in vain.
 
Not sure, why Jain user 'test' is not able to sftp to the Jail?
Can you help. I am not able to figure out the issue.
 
Thanks in advance
 
Regards
Aravind

_______________________________________________
Jailkit-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/jailkit-users

reply via email to

[Prev in Thread] Current Thread [Next in Thread]