0

I'm using Putty CLI on windows, with Python 2.7 I have created tunnel from A >> B, since i cannot access B directly. Tunnel: subprocess.Popen("putty -ssh -L 127.0.0.1:5001:10.25.248.50:22
ubuntu@34.251.111.259 -i myppkfile.ppk"

This works!

Now i'm trying to access B with SSH in order to take tomcat down for instance This is the code: subprocess.Popen("putty -ssh -p 5001 -i myppkfile.ppk ubuntu@127.0.0.1 -m path\file.txt (in file there is the command to take tomcat down for instance

This does not work!

Notes: 1. Access directly to server via ssh works as well (server that is accessable and there is no need for tunnel) subprocess.Popen("putty vmadmin@172.31.80.10 -pw 1ssssss -m path\file.txt")

2. Via linux i managed to access everything with no problem (using tunnel and -oStrictHostKeyChecking=no)

Any suggestion ? Thanks in advance

OhadS
  • 21
  • 3

0 Answers0