Skip to content

Commit

Permalink
Allow specifying the login user
Browse files Browse the repository at this point in the history
  • Loading branch information
dhubbard committed Feb 7, 2019
1 parent 4a70faa commit b684a0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/sshmap
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ if __name__ == "__main__":
help="Use sudo to run the command as root")
parser.add_option("--password", dest="password", default=False,
action="store_true", help="Prompt for a password")
parser.add_option('--login_user', default=None, help='Remote user to connect as')

(options, args) = parser.parse_args()

Expand All @@ -82,7 +83,7 @@ if __name__ == "__main__":

# Default option values
options.password = None
options.username = getpass.getuser()
options.username = options.login_user if options.login_user else getpass.getuser()
options.output = True
# Create our callback pipeline based on the options passed
callback = [sshmap.callback.summarize_failures]
Expand Down

0 comments on commit b684a0e

Please sign in to comment.