LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SSH tunnel commands to list active/disconnect (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-tunnel-commands-to-list-active-disconnect-799309/)

batfastad 04-01-2010 03:18 AM

SSH tunnel commands to list active/disconnect
 
Hi everyone

I've just started experimenting with SSH tunnels. I wanted a way to connect to MySQL on our website VPS but wanted the connection encrypted rather than just using PHP's mysql_connect() function and connecting to the remote IP.
This seems to be working great. I'm also looking into autossh to make sure that the tunnel gets reconnected when it drops.

Just one question though, is there a command/utility that can list the currently active SSH tunnels?

Be great if there was a way of terminating an active tunnel through a command as well.
Or is it a case of manually digging through the process list and killing the specific PID like I have been?

Any ideas/comments/suggestions?

Cheers, B

acid_kewpie 04-01-2010 03:37 AM

there's no specific command as far as I am aware of, but if you use netstat you can see all ports that the ssh client is listening on, which should really easily match up.


All times are GMT -5. The time now is 09:32 AM.