crypto icon indicating copy to clipboard operation
crypto copied to clipboard

Update client.go

Open Moorong opened this issue 3 years ago • 1 comments

The Client.NewSession method only returns the Session, but the opened channel is useless, and the user cannot obtain the channel because it is a private property. If you want to use the channel, you need to call the openChanne() method again. When I log in to the server and the switch ssh remotely, I use this source code, the server can be used normally, but the switch can only have one Session and one Channel, and cannot open another channel again. I add the NewSessionAndChannel() method to return the channel and request in the Session together, and use the channel to communicate with the switch and the server normally.

Moorong avatar Aug 19 '22 09:08 Moorong

This PR (HEAD: ae31a8bd46db90f4b0a6607db526dd28a13995ce) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/crypto/+/424921 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Aug 19 '22 09:08 gopherbot