.ssh/environment equivalent in dropbear
c.kurrat at googlemail.com
Sun Aug 26 21:29:26 WST 2007
2007/8/26, Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>:
> On Sun, 26 Aug 2007, Matt Johnston wrote:
> > Not in Dropbear itself. You might be able to edit a dotfile
> > for your shell to set environment variables? (I know .zshenv
> > works for zsh, though not sure about BusyBox shells)
> Thanks for the answers.
I already use the /etc/profile to set the PATH, but I think, /etc/profile is
only used on login, isn't it?
The busybox uses ash, but an .ash* file does not exist.
If I create the .ashrc and export ENV=/var/tmp/.ashrc it works, but to
export ENV, I again need the /etc/profile.
This works, but only with ssh, not with scp, due to the missing login.
I found this sentence at
"Environment variables set in a shell script will not have any effect to any
I think this is my problem, because the $PATH in an ssh session seems to be
a different one than the $PATH I get executing echo $PATH without logging
ssh root at fritz.box 'echo $PATH' : /usr/local/bin:/usr/bin:/sbin:/bin
echo $PATH inside the session : /sbin:/bin:/usr/sbin:/usr/bin:/var/tmp
In the link it is said that changing the boot-arguments would help, but this
is not practicable since I only change scripts after the machine has booted.
I thought it would be easily possible to change a line in the code to add
the correct path to scp on the router.
If so, could you tell me the file where I have to search?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dropbear