Skip to content

Instantly share code, notes, and snippets.

@nhthai2005
nhthai2005 / Autocomplete_ssh_scp.md
Last active January 7, 2025 10:17
Autocomplete server names for SSH and SCP for Git Bash

Autocomplete server names for SSH and SCP for Git Bash

For ssh

1. Make a file with name ssh as following content:

_ssh() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
@ericwastaken
ericwastaken / Running an ad-hoc command on multiple hosts using ansible.md
Last active November 14, 2025 19:04
Running ad-hoc Commands and Scripts on multiple hosts using Ansible

Running ad-hoc Commands and Scripts on multiple hosts using Ansible

Summary

Ansible is very helpful for automated deployments. However, it can also be used for server admin tasks against many servers by using both the Command, Shell and Script Modules.

Note: Although the process described here works with hosts that you can access via password or SSH keys, it is more convenient when working with hosts that you have SSH keys for (you don't have to enter passwords!)

License