Golang--实现ssh&scp
package main
import (
"fmt"
"github.com/pkg/sftp"
"golang.org/x/crypto/ssh"
"io"
"log"
"os"
"time"
)
type Cli struct {
user string
pwd string
addr string
client *ssh.Client
}
func NewCli(user,pwd, addr string) Cli {
return Cli{
user: us..
转载
2022-05-05 19:46:04 ·
1095 阅读 ·
0 评论