Re: [go-nuts] multiple commands in one ssh session

2017-05-20 Thread Matt Harden
Instead of session.Run, use session.Shell. To interact with the shell, you will need to connect to at least Stdin, probably using StdinPipe() (NOTE I left out error handling): session, err := client.NewSession() in, err := session.StdinPipe() out, err := session.StdoutPipe() session.Stderr = out

[go-nuts] multiple commands in one ssh session

2017-05-18 Thread Dominik Link
Hi I would like to run multiple ssh commands within the same 'context' as if it would be using putty when connecting to a cisco device. Here are two examples of what i would need to send to the device: 1) Setting the terminal width to 0 in order to remove the line breaks. This makes