无法从SSH获取stderr

I am trying to get the error info when running a command from ssh. Here is the example:

package main

import (
    "golang.org/x/crypto/ssh"
    "net"
)

func main() {
    config := &ssh.ClientConfig{
        User: "xx",
        Auth: []ssh.AuthMethod{
            ssh.Password("xxx"),
        },

        HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
            return nil
        },
    }

    sshClient, err := ssh.Dial("tcp", "x.x.x.x:22", config)
    if err != nil {
        panic(err.Error())
    }

    session, err := sshClient.NewSession()
    if err != nil {
        panic(err.Error())
    }

    data, err := session.CombinedOutput("ls2")
    if err != nil {
        // This prints : error = Process exited with status 127
        // Pos1
        print("error = " + err.Error())
        return
    }

    // Pos2
    content := string(data)
    println(content)
}

I test a wrong command: ls2, and I want to get the actual error info "-bash: ls2: command not found" at Pos2. But this test program failed at Pos1, and print "error = Process exited with status 127", which is not what I want, because I need the actual info.

try like this

session, err := sshClient.NewSession()
if err != nil {
    panic(err.Error())
}

defer session.Close()
data, err := session.CombinedOutput("ls2")
if err != nil {
    if v, ok := err.(*ssh.ExitError); ok {
        fmt.Println(v.Msg())
    }
}
fmt.Println(string(data))

and will output command not found: ls2

you can see the issues at here https://github.com/golang/go/issues/14251