.ssh/environment equivalent in dropbear

Christoph Kurrat 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)
>
> /etc/profile?
>
>
> Cheers,
>
> --
> Cristian
>
>
> 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
http://www.busybox.net/lists/busybox/2005-February/013688.html

"Environment variables set in a shell script will not have any effect to any
parent process."

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
in.

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?

Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20070826/6f710436/attachment.htm 


More information about the Dropbear mailing list