Re: [go-nuts] Re: While implement ssh client using golang, record keyboard input

2020-09-15 Thread Marvin Renich
* sc3983...@gmail.com [200915 11:41]: > Hi Everyone: > > I have the same problem, How do I get user input command, with *SSH > client with a Interactive Shell* > > 在 2018年10月23日星期二 UTC+8上午4:57:50,Sun Frank写道: > > > > Hi Everyone: > > > > I came across a problem which puzzled me for couple

[go-nuts] Re: While implement ssh client using golang, record keyboard input

2020-09-15 Thread sc3983315
Hi Everyone: I have the same problem, How do I get user input command, with *SSH client with a Interactive Shell* 在 2018年10月23日星期二 UTC+8上午4:57:50,Sun Frank写道: > > Hi Everyone: > > I came across a problem which puzzled me for couple of days. I am trying > to write a* SSH client with a Inte

[go-nuts] Re: While implement ssh client using golang, record keyboard input

2018-10-26 Thread zwb0511
HI , you can capture and store the sdtin buffer and handle it then, for example: // Set IO session.Stdout = os.Stdout session.Stderr = os.Stderr in, _ := session.StdinPipe() go func() { for { var buffer [1024]byte n, err := os.Stdin.Read(buffer[:]) if err != nil { fmt.Println("read error:", err