MCPcopy Create free account
hub / github.com/appleboy/easyssh-proxy / main

Function main

_examples/proxy/proxy.go:9–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7)
8
9func main() {
10 // Create MakeConfig instance with remote username, server address and path to private key.
11 ssh := &easyssh.MakeConfig{
12 User: "drone-scp",
13 Server: "localhost",
14 Port: "22",
15 KeyPath: "./tests/.ssh/id_rsa",
16 Proxy: easyssh.DefaultConfig{
17 User: "drone-scp",
18 Server: "localhost",
19 Port: "22",
20 KeyPath: "./tests/.ssh/id_rsa",
21 },
22 }
23
24 // Call Scp method with file you want to upload to remote server.
25 // Please make sure the `tmp` floder exists.
26 err := ssh.Scp("/root/source.csv", "/tmp/target.csv")
27 if err != nil {
28 panic("Can't run remote command: " + err.Error())
29 }
30 fmt.Println("success")
31}

Callers

nothing calls this directly

Calls 1

ScpMethod · 0.95

Tested by

no test coverage detected