func NewSSHClientConfig(user, keyFile, passworkPhrase string) (*SSHClient, error) {
	publicKeyMenthod, err := publicKey(keyFile, passworkPhrase)
	if err != nil {
		return nil, err
	}
	sshConfig := &ssh.ClientConfig{
		User: user,
		Auth: []ssh.AuthMethod{
			publicKeyMenthod,
		},
		HostKeyCallback: ssh.InsecureIgnoreHostKey(),
	}
	return &SSHClient{
		config: sshConfig,
	}, nil
}
NewSSHClientConfig returns client configuration for SSH client
package client
import (
	"bytes"
	"fmt"
	"io/ioutil"
	"strings"
	"golang.org/x/crypto/ssh"
)
type SSHClient struct {
	config *ssh.ClientConfig
	client *ssh.Client
}