Creating multiple SSH connections at a time using Paramiko

前端 未结 3 1154
一向
一向 2020-12-05 07:47

The code below runs grep in one machine through SSH and prints the results:

import sys, os, string
import paramiko

cmd = \"grep -h \'king\' /opt/data/horror         


        
3条回答
  •  情深已故
    2020-12-05 08:21

    In my case i have to execute commands on server with one ip and port and after complete need to do sftp to other ip and different port.Condition is one connection should be live while doing sftp to another ip due to port forwarding.

    Both connection are working separably but while combining both second sftp connection is not working.

提交回复
热议问题