(privateKey []byte, passPhrase []byte)
| 148 | } |
| 149 | |
| 150 | func makePrivateKeySigner(privateKey []byte, passPhrase []byte) (gossh.Signer, error) { |
| 151 | if len(passPhrase) != 0 { |
| 152 | return gossh.ParsePrivateKeyWithPassphrase(privateKey, passPhrase) |
| 153 | } |
| 154 | return gossh.ParsePrivateKey(privateKey) |
| 155 | } |
| 156 | |
| 157 | func (c *SSHClient) RunWithStreamOutput(command string, outputCallback func(string)) error { |
| 158 | session, err := c.Client.NewSession() |