Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
x/crypto/ssh: Is there a way to show detail msg for failed ssh command excu? #23023
Context: go version go1.9.2 linux/amd64, ubuntu 16.04.
My Problem situation:
I was going to run a command like
command := "fio -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=10M -numjobs=1 -runtime=1 -verify=md5 -group_reporting -name=mytest -filename=\\/dev\\/xxx | grep \\'bad\\'" // read session.StderrPipe() and session.StdoutPipe() _, err = session.Output(cmd)
What I got is err as 'Process exited with status 1' with stdoutput and stderr as empty.
You can't use the Output or CombinedOutput methods while also StderrPipe and StdoutPipe.
Are you checking your errors?
Actually, where's your actual code? There's not enough context to help here.
But in general, questions about Go should go to https://golang.org/wiki/Questions.