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/dmap | |
| parent | 02f60d098e659cee33e42f501b2b07508abbae0a (diff) | |
can specify a private ssh key via command line, no password support yet though
Diffstat (limited to 'cmd/dmap')
| -rw-r--r-- | cmd/dmap/main.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cmd/dmap/main.go b/cmd/dmap/main.go index cae1552..d7b5fae 100644 --- a/cmd/dmap/main.go +++ b/cmd/dmap/main.go @@ -29,6 +29,7 @@ func main() { var sshPort int var timeout int var trustAllHosts bool + var privateKeyPathFile string userName := user.Name() @@ -46,6 +47,7 @@ func main() { flag.StringVar(&queryStr, "query", "", "Map reduce query") 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() @@ -60,14 +62,15 @@ 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, - Mode: omode.MapClient, - Timeout: timeout, + ConnectionsPerCPU: connectionsPerCPU, + ServersStr: serversStr, + Discovery: discovery, + UserName: userName, + What: files, + TrustAllHosts: trustAllHosts, + Mode: omode.MapClient, + Timeout: timeout, + PrivateKeyPathFile: privateKeyPathFile, } client, err := clients.NewMaprClient(args, queryStr) |
