Documentation
¶
Overview ¶
This package provides simple SCP client for copying data recursively to remote server. It's built on top of x/crypto/ssh
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewDumbClient ¶
Creates a new SCP client. Use this only with trusted servers, as the host key verification is bypassed. It enables preserve time stamps
func (*Client) Send ¶
Send the files dst directory on remote side. The paths can be regular files or directories.
Example ¶
if len(os.Args) < 2 { log.Fatal("Usage: ", os.Args[0], " <path1> <path2> ...") } c, err := scp.NewDumbClient("username", "password", "server.com:22") if err != nil { log.Fatal(err) } c.Quiet = true err = c.Send("/tmp", os.Args[1:]...) if err != nil { log.Fatal(err) }
Output:
Click to show internal directories.
Click to hide internal directories.