Using lsof -i I can see there is a reverse ssh tunnel set up on my server:

sshd       1321   remote    8u  IPv4 219299       TCP localhost.localdomain:mvs-capacity (LISTEN)

How can I find out the IP address of the machine that created this tunnel?

Thanks

link|improve this question
feedback

4 Answers

Run lsof -i | grep 1321 to see the other connections the pid has, one of which should be the ip of the machine that created the tunnel.

link|improve this answer
feedback

or you can use netstat -a

link|improve this answer
feedback

lsof -nPp 1321

link|improve this answer
feedback

Try netstat -ntp | grep 1321 (replace 1321 with the pid of the process in question.). This will allow you to see the network connections.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown