I have 3 hosts:
Ipaddresses: hostA = 10.108.190.23
hostB = 10.108.190.82
hostC = 128.221.252.67
I can ping hostB
from hostA
and hostC
from hostB
....There is no direct path from hostA
to hostC
I want to run a script on hostA
which would start ntpd daemon
on hostB
and hostC
and also transfer some files.
Using paramiko
I have been able to do that from hostA
to hostB
but then I am stuck.
I tried to send a python script to hostB
which would start the ntpd daemon
on hostC
but that didn't work as the pythong script on hostB
is making an ssh connection using subprocess
module since paramiko
is not available on hostB
and I am not allowed to install it either.
Could someone please help me to understand how to perform this double ssh?
Also when I use paramiko
to connect to remote machine and execute code, does the code get executed on my machine or remote machine?