LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-18-2003, 12:27 PM   #1
BU5T4
LQ Newbie
 
Registered: Oct 2003
Location: Scotland
Distribution: RedHat 9.0
Posts: 17

Rep: Reputation: 0
Starting SSH Reverse tunnelling at boot


Hi folks,

Im new to ssh tunneling

What i want to do is open a reverse ssh tunnel to a server from behind a firewall. i have figured out how to do this from the xterm, but what i want to do is get it to start this tunnel anytime the system reboots.

I have tried creating a script like this;

#!/bin/sh
/usr/bin/ssh -T -R 8888:localhost:80 root@www.myhost.com -g -e none &
/usr/bin/ssh -T -R 8888:localhost:80 root@www.myhost.com -g -e none &

These run fine if i start them in a terminal window but when i added them to /etc/rc.d/rc.local it doesnt work.

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/home/start_ssh_tunnels

but this doesnt work.

Any ideas folks?

Cheers in advance

Last edited by BU5T4; 11-18-2003 at 01:02 PM.
 
Old 11-18-2003, 03:03 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
What are the permissions/ownerships on
the file?

Cheers,
Tink
 
Old 11-18-2003, 04:33 PM   #3
BU5T4
LQ Newbie
 
Registered: Oct 2003
Location: Scotland
Distribution: RedHat 9.0
Posts: 17

Original Poster
Rep: Reputation: 0
the permissions on the sript? they are 766? i think. they are set as executable

I't doesnt matter now any way i have just opened port forwarding on my router and i can start it by ssh'ing into the box and starting it manually.

Cheers for your advice anyways

D-A

Last edited by BU5T4; 11-18-2003 at 04:35 PM.
 
  


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
Tunnelling yahoo messenger through SSH pnellesen Linux - Networking 1 09-17-2005 07:37 PM
tightvnc using ssh tunnelling curmudgeon42 Linux - Software 1 08-18-2004 10:40 PM
reverse ssh? slashcom Linux - Software 3 08-12-2004 11:51 PM
ssh tunnelling internet access bfkeats Linux - Networking 2 03-19-2004 04:13 PM
Advantages in SSH tunnelling for net access?? Nerd2 Linux - Software 9 06-16-2003 05:13 AM


All times are GMT -5. The time now is 11:29 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration