LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2010, 04:18 AM   #1
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Rep: Reputation: 23
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
 
Old 04-01-2010, 04:37 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding proc list and task list of active processes. pravin.embedded Linux - Newbie 1 09-02-2008 02:20 PM
How to have iptables disconnect active connections? xygoteneph Linux - Networking 1 08-20-2007 03:32 PM
Reverse SSH tunnel active only from localhost andreag Linux - Networking 2 12-19-2006 03:05 AM
How to disconnect user from list sajidmumtaz Solaris / OpenSolaris 6 06-22-2006 02:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration