Saturday, 20 June 2020

Windows host through SSH bastion on Ansible



Pre requisite :

install the required Python packages pip install ansible pypsrp requests[socks]

command to route traffic 

ssh -o "ControlMaster=auto" -o "ControlPersist=no" -o "ControlPath=~/.ssh/cp/ssh-%r@%h:%p" -CfNq -D 127.0.0.1:2222 -p 2222 root@<bastion server IP>

[windowstarget]
<IP>
[windowstarget:vars]
ansible_user=<domain>\<username>
ansible_password=<password>
ansible_connection=psrp
ansible_psrp_protocol=http
ansible_psrp_proxy=socks5h://localhost:2222








REF#

No comments:

Post a Comment

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...