Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th May 2013, 13:27
stef70 stef70 is offline
Junior Member
 
Join Date: May 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default Jailkit + SSH_ORIGINAL_COMMAND

I am hosted on a site that uses ispconfig.

I created a ssh account to host a rsync server. I am trying to secure the ssh connection as indicated in http://troy.jdmz.net/rsync/index.html :

(1) In ~/.ssh/authorized_keys, prefix the ssh key with command="/home/bob/zzzzz.sh"
(2) In the script /home/bob/zzzzz.sh , filter the connection according to the environment variable SSH_ORIGINAL_COMMAND as shown on the above page.

The problem is that the ssh connection does not provide the environment variable SSH_ORIGINAL_COMMAND when the ssh user is chrooted with Jailkit.

I suspect that jailkit is filtering the environment variable. This is probably not a ssh server issue since the environment variable is there when the account is not chrooted.

I would appreciate some advices before I contact the site administrator (ideally with the solution)

To reproduce the problem:

(a) create a ssh user with a jailkit chroot

(b) prepend command="/bin/bash" to its ssh public key:
command="/bin/bash" ssh-rsa AAAAB3NzaC1yc2EAAAADAQ...

(c) log with 'ssh SERVER xxxxxx'
that should trigger a bash shell without a prompt

(d) list all environment variables with the bash command 'set'.
SSH_ORIGINAL_COMMAND should be xxxxxx but it is unset
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
jailkit - Activate jailkit user can't login DaWy General 20 21st January 2014 21:00
Jailkit confusion Quijote Shin Developers' Forum 0 20th March 2013 16:05
SFTP login and Jailkit problem jvargas General 1 15th August 2012 08:56
How to disable completely Jailkit for Cron jobs? jvargas Installation/Configuration 1 27th May 2012 13:47
creating a jailkit user fails Justin Albstmeijer General 5 30th August 2011 17:02


All times are GMT +2. The time now is 10:11.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.