sftp jail with scp
hi guys,
rhel6.3 64bit i have setup a sftp jail Code:
Subsystem sftp internal-sftp sftp jail working fine, but they cant run script with scp command. by default sftp jail wont allow scp? do i need to add them to ssh jail and give only scp features? or is there any better way? thanks |
Try to create the jail using the following commands:
jk_init -v -j /home/jail_dir/ basicshell editors extendedshell ssh sftp scp jk_jailuser -v -m -s /bin/bash -j /home/jail_dir/ jail_user Do not forget to change 'jail_dir' and 'jail_user' with the actual jail directory and user. |
hi, jk_init command not found.
i have tested like this user A, sftp jailed, without sshjail, when /sbin/nologin cant ssh, cant winscp using scp, can only winscp sftp when /bin/bash cant ssh, cant winscp using scp, can only winscp sftp user B, sftp jailed, ssh jailed when /sbin/nologin cant ssh, cant winscp using scp , can only winscp sftp when /bin/bash can ssh, can winscp using scp, can winscp sftp i know i can give the users A sshjail, but is this the only way? am i on the right track? thanks |
Follow the instructions below to create an SSH chrooted jail using jailkit:
wget http://olivier.sessink.nl/jailkit/jailkit-2.15.tar.gz tar -zxvf jailkit-2.15.tar.gz cd jailkit-2.15 ./configure make make install mkdir -p /home/jail_dir jk_init -v -j /home/jail_dir/ basicshell editors extendedshell ssh sftp scp adduser jail_user passwd jail_user jk_jailuser -v -m -s /bin/bash -j /home/jail_dir/ jail_user |
All times are GMT -5. The time now is 11:30 PM. |