Question: It would be helpful to understand how can I connect the second column in the script. currently using the below for loop 

```
for i in cat server
do     
    echo ===$i====
    ssh -q $i 'netstat -tulpun | egrep '22|13''
done  

```

multiple server with different port for example below are the server in the first column & port in the second

```none
Jan 113  
Feb 114  
Mar 115  
Apr 116  
May 117  

```

Answer: 
You should start with:

```
#!/bin/bash

cat server | while read str 
do
  server=$(echo "$str" | cut -d' ' -f 1)
  port=$(echo "$str" | cut -d' ' -f 2)
  echo server: "$server" port: "$port"
  ssh -q "$server" 'netstat | grep -E "'"$port"'"'
done

```

assuming the file with server-port pairs is called `server` and then extend that with your `ssh` command. 

The `cat server` just assigns these two values to `i` in your for loop, you could do `for i in $(cat server)` but that doesn't give you the lines as the example above does and it is IMO easier to split the values on a line than to combine multiple values in consecutive (`for`) loop passages.
Assuming you meant `for i in $(cat server) ...`, consider using `while read` loop:

```
while read host port
do
    echo ===$host====
    ssh -q "$host" 'netstat -tulpun | egrep "'"$port"'"'
done < server

```

Assuming:

* there are exactly two whitespace-separated entries in each line,
* the second entry is a valid port number