0

Please help me! I am quite new in paramiko.

I faced a problem when I used paramiko connect to Host_A but I need ssh Host_B with the same password again in Host_A.

How can I do? Thanks in advance.

hostname = 'Host_A'
port = 22
username = 'username' 
password = 'password'
client = paramiko.Transport((hostname, port))
client.connect(username=username, password=password)

python paramiko ssh

Community
  • 1
  • 1
Daffiny
  • 21
  • 4
  • Sorry. I forgot to say that in Host_B. I need to execute a commend (like 'ls' ) then output the results. – Daffiny Dec 01 '15 at 19:56
  • you want to ssh to hostA and then from hostA to hostB? – letsc Dec 01 '15 at 20:07
  • Another similar questions: [How to create a ssh tunnel using python and paramiko?](http://stackoverflow.com/q/8169739/850848) and [Port forwarding with paramiko](http://stackoverflow.com/q/11294919/850848). – Martin Prikryl Dec 02 '15 at 07:26

0 Answers0