Re: [go-nuts] How to retain environment in SSH

2019-03-11 Thread Manuel Amador (Rudd-O)
I can think of one thing which may be the case: If you SSH via the terminal, some bashrc/bashprofile thingie might run on the server that would not otherwise run in batch mode (noninteractively, which is what your Go code is likely doing). Try this: ssh -o "BatchMode yes" host sh -c 'echo $VARIA

[go-nuts] How to retain environment in SSH

2019-03-11 Thread Subramanian Sridharan
Hi guys! I would like to know how to keep the environment variables over SSH using Go. I find that several environment variables are missing when I SSH using Go. For instance, the proxy environment variables are not present when I SSH using Go, but they're present when I SSH using an actual t