From: Oleg Broytman Date: Sun, 14 Jul 2019 03:09:45 +0000 (+0300) Subject: Feat: Add `ansible-ssh` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ebe71df17532c3f2645a0cfdb1067b2d0002ac15;p=ansible.git Feat: Add `ansible-ssh` A script to create SSH connection sharing control path (alsmost) the same way ansible does it. Requires [ssh_connection] ssh_args = -C -o ControlMaster=auto -o ControlPath="~/.ssh/controls/%r@%h:%p" -o ControlPersist=600 in `~/.ansible.cfg`. --- diff --git a/ansible-ssh b/ansible-ssh new file mode 100755 index 0000000..9ccda46 --- /dev/null +++ b/ansible-ssh @@ -0,0 +1,8 @@ +#! /bin/sh + +if [ -z "$1" ]; then + echo "Usage: $0 host [port]" >&2 + exit 1 +fi + +exec ssh -C -o ControlMaster=auto -o ControlPath="$HOME/.ansible/cp/ansible-ssh-%h-%p-%r" -o ControlPersist=600 "$1" -p "${2:-22}"