ssh连接器:
package ssh_connector
import (
"fmt"
"net"
"golang.org/x/crypto/ssh"
)
func Connect(user, password, host string, port int) (*ssh.Session, error) {
var (
auth []ssh.AuthMethod
addr string
client *ssh.Client
session *ssh.Session
err error
)
// get auth method
auth = make([]ssh.AuthMethod, 0)
auth =