actually, i subscribed with a dynamic DNS provider (dyndns.org, free of charge), and so i can refer to my home machine by name, not IP.. and true that the IP gets changed everyday, which can be solved by writing a simple cron job (at your work machine) that checks if the tunnel is up, and initiates it if it is down.

Here's the cron job:
#!/bin/sh

COMMAND='ssh -N -R 2048:localhost:22 my_home_system'

# Is the tunnel up?
CHECK_TUNNEL=`ps -eo args | grep "$COMMAND" | grep -v grep`

# If the tunnel is not up, create the tunnel
if [ -z "$CHECK_TUNNEL" ] ; then
   $COMMAND
fi

I hope that answers your questions

On 3/8/06, Abdallah <[EMAIL PROTECTED]> wrote:
Salam all

But how does that solve the dynamic IP situation ? You "homecomputer"  is given a new IP every time. How would your Work computer know what is you "homecomputer"  the next day?


Please elaborate :)


Abdallah

> ----- Original Message -----
> From: "Al-Faisal El-Dajani" < [EMAIL PROTECTED]>
> To: "Jordan Linux User Group Mailing list" <[email protected]>
> Subject: [JoLUG-General] Gotcha: Reverse SSH
> Date: Sun, 26 Feb 2006 11:40:04 +0200
>
>
> If you ever need to control a machine through SSH, but the machine is behind
> a firewall or doesn't have a static IP you can do a reverse SSH.
>
> For instance if at your home you want to login to your work machine, you do
> the following:
> 1) at your work machine you type:
> ssh -R 2048:localhost:22 homecomputer
>
> 2) from you home computer you type:
> ssh -p 2048 localhost
>
> and voila, you are in...
>
> Needless to say you need ssh server on both machines.
> --
> Al-Faisal El-Dajani
> Tel: +962-7-77 799 781
> URL: http://www.linuxhome.trickip.net
> P.O Box: 140056
> 11814 Amman, Jordan
>
> May the source be with you
>
> _______________________________________________
> General mailing list
> [email protected]
> http://mail.jolug.org/mailman/listinfo/general_jolug.org

>


--
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/


_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org



--
Al-Faisal El-Dajani
Tel: +962-7-77 799 781
URL: http://www.linuxhome.trickip.net
P.O Box: 140056
11814 Amman, Jordan

May the source be with you
_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org

Reply via email to