Closed debackel closed 11 years ago
Hi Laurent,
Thank you for taking the time to write this patch.
I have applied your diff locally and tested it. The issue I am encountering is that I am to add the "myscript.sh" to my user's allowed commands in order for it to be executed. Otherwise, I get a:
*** unknown command: /home/ghantoos/src/lshell/myscript.sh
In order to remove this dependency, I have added the following before the while loop
if self.conf['login_script']:
os.system(self.conf['login_script'])
I will pull your request than apply my changes.
If you have any suggestion, don't hesitate. :)
Thanks again.
Here is the correction I have committed after pulling your code.
https://github.com/ghantoos/lshell/commit/4039b67d8209f70ce90e7d8266ef35fdd1f3f91d
Cheers, Ignace M
Hi,
Thank YOU for this great piece of software and for taking my patch into account.
I agree with your view that the login script should be n the allowed commands.
I was hoping to have afind a way to exit the session when
2013/1/2 Ignace Mouzannar notifications@github.com
Hi Laurent,
Thank you for taking the time to write this patch.
I have applied your diff locally and tested it. The issue I am encountering is that I am to add the "myscript.sh" to my user's allowed commands in order for it to be executed. Otherwise, I get a:
*\ unknown command: /home/ghantoos/src/lshell/myscript.sh
In order to remove this dependency, I have added the following before the while loop
if self.conf['login_script']: os.system(self.conf['login_script'])
I will pull your request than apply my changes.
If you have any suggestion, don't hesitate. :)
Thanks again.
— Reply to this email directly or view it on GitHubhttps://github.com/ghantoos/lshell/pull/30#issuecomment-11826926.
=> Sorry, wrong key pressed the first time <=
Hi
Thank YOU for this great piece of software and for taking my patch into account. I agree with your view that the login script should be in the allowed commands. I was also hoping to have a find a way to exit the session when the script ends. The purpose is to only open the session for the purpose of letting specific people to use a specific script. And nothing more...
Our case is to allow customer care operators to have access to a provisioning script installed on a Linux server, but to that script only.
If you have a suggestion, I'd be interested.
Thanks again for your help.
Best regards,
Laurent.
2013/1/4 laurent debacker laurent.debacker@gmail.com
Hi,
Thank YOU for this great piece of software and for taking my patch into account.
I agree with your view that the login script should be n the allowed commands.
I was hoping to have afind a way to exit the session when
2013/1/2 Ignace Mouzannar notifications@github.com
Hi Laurent,
Thank you for taking the time to write this patch.
I have applied your diff locally and tested it. The issue I am encountering is that I am to add the "myscript.sh" to my user's allowed commands in order for it to be executed. Otherwise, I get a:
*\ unknown command: /home/ghantoos/src/lshell/myscript.sh
In order to remove this dependency, I have added the following before the while loop
if self.conf['login_script']: os.system(self.conf['login_script'])
I will pull your request than apply my changes.
If you have any suggestion, don't hesitate. :)
Thanks again.
— Reply to this email directly or view it on GitHubhttps://github.com/ghantoos/lshell/pull/30#issuecomment-11826926.
Are you looking for the script to run at login, then exit the SSH session?
Yes indeed.
2013/1/4 Ignace Mouzannar notifications@github.com
Are you looking for the script to run at login, then exit the SSH session?
— Reply to this email directly or view it on GitHubhttps://github.com/ghantoos/lshell/pull/30#issuecomment-11885591.
One technique is to set the "timer" variable to "1", this way the session is closed after one second.
Otherwise, you can configure that via the .ssh/authorized_keys file, this would not require lshell, e.g:
command="yourscript.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-dss .....
Hi Ignace,
The timer to 1 does the job.
Great! Thank you!
And again, thanks for this great piece of software!
Laurent.
2013/1/4 Ignace Mouzannar notifications@github.com
One technique is to set the "timer" variable to "1", this way the session is closed after one second.
Otherwise, you can configure that via the .ssh/authorized_keys file, this would not require lshell, e.g:
command="yourscript.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-dss .....
— Reply to this email directly or view it on GitHubhttps://github.com/ghantoos/lshell/pull/30#issuecomment-11890599.
Excellent! :)
This patch provides the ability to define a script which will be executed just after login into lshell.