i want to send text files via ssh to 2 servers. My servers have the same name and ip but different ports.

I can do it with 1 server but not with 2 how do I do this (normally there should be a port next to -p).

```
import subprocess

with open("hosts_and_ports.txt") as hp_fh:
    hp_contents = hp_fh.readlines()
    for hp_pair in hp_contents: 
        with open("commands.txt") as fh:
            completed = subprocess.run("ssh ubuntussh@127.0.0.1 -p ", capture_output=True, text=True, shell=True, stdin=hp_pair)

```

My text file hosts\_and\_ports.txt contains the ports of my servers

```
2222;
2224;
exit;

```

My text file commands.txt contains the files I want to forward via ssh

```
touch demofile1.txt;
touch demofile2.txt;
exit;

```