Re: [go-nuts] SSH session.Setenv usage

2021-11-18 Thread Cobe Gu
Hi Brain, Nice to have your reply, yes, my fault, wrong paste. but still hard to see the root reason with a few error contents. as my understanding, Setenv has strong dependency on remote sshd config - AcceptEnv, if need to pass LC_TEST to remote, it must be configured in remote to accept i

Re: [go-nuts] SSH session.Setenv usage

2021-11-17 Thread Brian Candler
No: the "unclear" message "Failed to set env" is an error message *you* generated. You ignored the content of the "err" variable (which could have contained a detailed description of the error), and replaced it with your own bland text. Try replacing it with something like this (untested): lo

Re: [go-nuts] SSH session.Setenv usage

2021-11-16 Thread Cobe Gu
Thanks for your reply. that's a trick thing to print all embedded errors. After digging more, Setenv function is related to the configuration ' AcceptEnv' of remote server's sshd, if variable name is not accepted by ' AcceptEnv', it will throw out this unclear error 'Failed to set env' 在2021年

Re: [go-nuts] SSH session.Setenv usage

2021-11-16 Thread Brian Candler
You resurrected a 7 year old thread for this! :-) The first thing I suggest you do is to print the value of "err" and you may get back some information about why it failed. (Same for everywhere else that err != nil) -- You received this message because you are subscribed to the Google Groups