Does anyone know how to make environment variables registered for
exec_command calls when using SSHClient? I'm using a basic script that
instantiates the SSHClient class, connects to another computer using the
connect method, then sends out commands using the exec_command method.
However, none of the environment variables seem to be registered when I
try to issue commands. I can do basic things like 'ls' and see the stdout,
but when trying to run installed programs, the fact that the environment
variables are missing makes it impossible to run them. Using ssh in the
command line to do the same thing works, as the environment variables for
the user are set.
Issuing a "source path/to/.profile" doesn't seem to do anything to future
commands issued by the exec_command method. But there does seem to be some
persistence between exec_command calls, because using "sudo -s" to become
a super user does affect future calls to exec_command.
-Min
_______________________________________________
paramiko mailing list
[email protected]
http://www.lag.net/cgi-bin/mailman/listinfo/paramiko