diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-05-20 14:10:56 +0100 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-05-20 14:10:56 +0100 |
| commit | 724b6c82f591ec696f14dfb7d6e8e133eff1072f (patch) | |
| tree | 98fffb253e0408f52ec39324c377b7db4a6ae79d /cmd/dcat | |
| parent | 02f60d098e659cee33e42f501b2b07508abbae0a (diff) | |
can specify a private ssh key via command line, no password support yet though
Diffstat (limited to 'cmd/dcat')
| -rw-r--r-- | cmd/dcat/main.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cmd/dcat/main.go b/cmd/dcat/main.go index 42b29bf..1ab67c2 100644 --- a/cmd/dcat/main.go +++ b/cmd/dcat/main.go @@ -26,6 +26,7 @@ func main() { var quietEnable bool var sshPort int var trustAllHosts bool + var privateKeyPathFile string userName := user.Name() @@ -41,6 +42,7 @@ func main() { flag.StringVar(&files, "files", "", "File(s) to read") flag.StringVar(&serversStr, "servers", "", "Remote servers to connect") flag.StringVar(&userName, "user", userName, "Your system user name") + flag.StringVar(&privateKeyPathFile, "key", "", "Path to private key") flag.Parse() @@ -55,12 +57,13 @@ func main() { logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable, Quiet: quietEnable}) args := clients.Args{ - ConnectionsPerCPU: connectionsPerCPU, - ServersStr: serversStr, - Discovery: discovery, - UserName: userName, - What: files, - TrustAllHosts: trustAllHosts, + ConnectionsPerCPU: connectionsPerCPU, + ServersStr: serversStr, + Discovery: discovery, + UserName: userName, + What: files, + TrustAllHosts: trustAllHosts, + PrivateKeyPathFile: privateKeyPathFile, } client, err := clients.NewCatClient(args) |
