Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto/ssh: Is there a way to show detail msg for failed ssh command excu? #23023

DeathPoem opened this issue Dec 7, 2017 · 2 comments


None yet
3 participants
Copy link

commented Dec 7, 2017

Context: go version go1.9.2 linux/amd64, ubuntu 16.04.

related issue

related commit

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.
What I want is to get detail why my command fails.
Due to 'related commit' it seems that this lib don't support more detail msg, how can I get over it? (Although I can work around it)

@gopherbot gopherbot added this to the Unreleased milestone Dec 7, 2017


This comment has been minimized.

Copy link

commented Dec 7, 2017

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


This comment has been minimized.

Copy link

commented Dec 7, 2017

@bradfitz bradfitz closed this Dec 7, 2017

@golang golang locked and limited conversation to collaborators Dec 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.