Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

SSH Tunnel Help

Subject: SSH Tunnel Help
Date: Mon, 27 Sep 2004 16:20:42 -0500
I have a shell script that creates a SSH tunnel when I check my email.
I am using OpenSSH (protocol 2). Here are some things to know about
before you look at the script: first, I can ssh without entering a
password, and secondly in evolution I have it set to check mail on the
localhost with ports 8110, and 8025. Here is what the script looks
like:

#!/bin/sh

# set up SSH tunnel
ssh -L 8110:mailserver:110 -L 8025:mailserver:25 username@host.com
'sleep 600; exit' &

# start up Evolution
evolution

The problem with my script is that the SSH tunnel is only good for 10
minutes. So if I read through my email and it takes me 15 minutes,
then I decide to send email or check email again, it won't work
because of the SSH tunnel being closed. Is there a better way to do
this? Is there a way I can make a shell script to create the SSH
tunnel, start evolution, the when I close evolution, the SSH tunnel
will close. I was thinking that it might be possible by having it
check to see if the evolution process id is running or not. Let me
know how I can do this? If anyone has any better ideas about this let
me know. Thanks.

Phusion

<Prev in Thread] Current Thread [Next in Thread>