summaryrefslogtreecommitdiff
path: root/cmd/dgrep
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/dgrep')
-rw-r--r--cmd/dgrep/main.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go
index c136b43..faffe76 100644
--- a/cmd/dgrep/main.go
+++ b/cmd/dgrep/main.go
@@ -27,6 +27,7 @@ func main() {
var quietEnable bool
var sshPort int
var trustAllHosts bool
+ var privateKeyPathFile string
userName := user.Name()
@@ -43,6 +44,7 @@ func main() {
flag.StringVar(&regex, "regex", ".", "Regular expression")
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()
@@ -57,13 +59,14 @@ 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,
- Regex: regex,
+ ConnectionsPerCPU: connectionsPerCPU,
+ ServersStr: serversStr,
+ Discovery: discovery,
+ UserName: userName,
+ What: files,
+ TrustAllHosts: trustAllHosts,
+ Regex: regex,
+ PrivateKeyPathFile: privateKeyPathFile,
}
client, err := clients.NewGrepClient(args)