Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- setting environment for SSH and SCP session
- Claus Østby Nielsen
April 25, 2004, 7:26 am
rate this thread
environment when you execute commands remotely via ssh?.
If I login using "ssh remotehost" then I get a reasonable environment,
probably comes from my .profile, however if I "ssh remotehost command"
then the environment that the command runs in is quite spartan.
What I need to know is how do I configure the environment in the
second case, specifically I need to add the usual */bin paths to the
My default shell is '/bin/sh'
- Richard E. Silverman
April 27, 2004, 1:56 am
Re: setting environment for SSH and SCP session
Assuming your shell is bash, read the INVOCATION section of bash(1),
remembering that the shell you get for remote command execution (an SSH
exec channel) is non-interactive in the terminology of that man page.
You don't say what SSH software you're using. If the server is OpenSSH,
then see ssh(1) regarding PermitUserEnvironment and ~/.ssh/environment.
- » Can't compile OpenSSH (SSH1) with Kerberos5 on Linux 2.4
- — Previous thread in » Secure Shell Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum