Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: How to make sshd inherit environment variable from its parent process? |
|---|---|
| Date: | Tue, 31 Jan 2006 10:53:59 -0500 |
You could set all the variables you want in
~/.ssh/environment
Thanks,
- Chnasup
./thanks ilaiy On 1/30/06, Chansup Byun <Chansup.Byun@sun.com> wrote:
Hi,
I am using OpenSSH 4.2p1.
I need to make sshd process to inherit some environment variables (EVs) from its parent process. It looks like sshd process only inherits a limited number of EVs: HOME, LOGNAME, MAIL, PATH,PWD,SHELL,SSH_CLIENT,SSH_CONNECTION,TZ, and USER.
Is it possible to make the child sshd process inherit some EVs from its parent process? Those EVs are dynamically set after submitting a job.
Please let me know how to do it if it's possible.
26768 /gridware/n1ge6u6/bin/sol-sparc64/sge_execd 26769 sge_shepherd-412 -bg 26785 -ksh /gridware/n1ge6u6/default/spool/hes-hpc4/job_scripts/412 26847 /gridware/n1ge6u6/bin/sol-sparc64/qrsh -nostdin -inherit hes-hpc4 sleep 120; ec 26850 /usr/local/bin/ssh -x -n -p 59527 hes-hpc4 exec '/gridware/n1ge6u6/utilbin/sol- 26848 sge_shepherd-412 -bg 26849 /usr/local/sbin/sshd -i <<< Why the sshd process inherits only some EVs from its parent process? 26852 /usr/local/sbin/sshd -i 26853 /gridware/n1ge6u6/utilbin/sol-sparc64/qrsh_starter /gridware/n1ge6u6/default/sp 26854 ksh -c sleep 120; echo BATCH;ulimit -t 26855 sleep 120
The parent sge_shepherd process sets some environment variables dynamically. Onne of them is called "ENVIRONMENT". Using the ENVIRONMENT variable attribute [ either interactive or batch], users' computational resources can be set differently.
Since sshd didn't inherit the ENVIRONMENT variable, the variable didn't get passed to its child process, qrsh_starter as shown above. So resources doesn't get set properly.
Thanks,
- Chansup
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: How to make sshd inherit environment variable from its parent process?, ilaiy |
|---|---|
| Next by Date: | Re: How to make sshd inherit environment variable from its parent process?, ilaiy |
| Previous by Thread: | Re: How to make sshd inherit environment variable from its parent process?, ilaiy |
| Next by Thread: | Re: How to make sshd inherit environment variable from its parent process?, ilaiy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |