crypto
crypto copied to clipboard
Update client.go
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.
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