ssh-sudo-try summary

Plugin Name: ssh-sudo-try
Version: 0.4.0
Author: @melezhik
Realease Date: 2019-01-07 22:10:10
Short Description: Connects to remote server by ssh and determines if user has sudo access for some command
Category: utilities
Plugin web page: https://github.com/melezhik/ssh-sudo-try
 
Download link: ssh-sudo-try-v0.004000.tar.gz
Latest version link: https://sparrowhub.org/info/ssh-sudo-try

# 0.4.0

Refactoring ( use the fetures from recent Sparrow/Outthentic ).

ssh-sudo-try documentation

SYNOPSIS

Connects to remote server by ssh and determines if user has sudo access for the command.

INSTALL

sparrow plg install ssh-sudo-try

USAGE

Tomtit/Sparrowdo

  # check for the current user
  task-run "ssh/sudo check", "ssh-sudo-try", %(
    servers => "23.100.124.15,23.100.124.16,23.100.124.17"
  );

  # check for specific current user
  task-run "ssh/sudo check", "ssh-sudo-try", %(
    servers       => "23.100.124.15,23.100.124.16,23.100.124.17"
    ssh_command   => "ssh -l foo -tt"
  );

Sparrow cli:

  $ sparrow project create cluster
  $ sparrow task add cluster sudoers ssh-sudo-try
  $ sparrow task ini cluster sudoers 

    servers = 127.0.0.1,foo.bar.baz,192.168.0.0.1

    ssh_command = ssh -l foo -i ~/my_key.pem 

    sudo_command = sudo /bin/bash -c 'echo'

  $ sparrow task run cluster sudoers

Setting parameters on runtime:

  $ sparrow check run cluster sudoers \
  --param servers=192.168.0.1,192.168.0.2 \
  --param sudo_command='"sudo /etc/init.d/nginx restart'"

AUTHOR

Alexey Melezhik