<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Creating a Permanent SSH Tunnel Between Linux Servers</title> <atom:link href="http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/feed" rel="self" type="application/rss+xml" /><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers</link> <description>Web Programming, Linux System Administation, and other geeky stuff</description> <lastBuildDate>Thu, 05 Jan 2012 11:11:59 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: dave</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1856</link> <dc:creator>dave</dc:creator> <pubDate>Fri, 25 Feb 2011 02:19:32 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1856</guid> <description>I&#039;m running this on a router. It forwards ports 139 and 445 from a remote samba server. Local windows clients can now access remote network shares by pointing at the router.Had some problems with the original and the check-script posted by John on 15 Jan 2010. Got a fix that worked, though:
Replaced:nc -w1 localhost $tunnel_entrance_port
with:
lsof -i :$tunnel_entrance_portThe first passed an error every time, so the original script always tried to re-create the tunnel(s). lsof -i checks for a process listening to a particular port. I figured that if the port is already open, ssh won&#039;t be able to create the tunnel anyway.</description> <content:encoded><![CDATA[<p>I&#8217;m running this on a router. It forwards ports 139 and 445 from a remote samba server. Local windows clients can now access remote network shares by pointing at the router.</p><p>Had some problems with the original and the check-script posted by John on 15 Jan 2010. Got a fix that worked, though:<br
/> Replaced:</p><p>nc -w1 localhost $tunnel_entrance_port<br
/> with:<br
/> lsof -i :$tunnel_entrance_port</p><p>The first passed an error every time, so the original script always tried to re-create the tunnel(s). lsof -i checks for a process listening to a particular port. I figured that if the port is already open, ssh won&#8217;t be able to create the tunnel anyway.</p> ]]></content:encoded> </item> <item><title>By: Life-Blog &#187; Bouw een redundant mysql systeem &#8211; deel 1</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1783</link> <dc:creator>Life-Blog &#187; Bouw een redundant mysql systeem &#8211; deel 1</dc:creator> <pubDate>Tue, 24 Aug 2010 20:06:53 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1783</guid> <description>[...] reading: - http://www.howtoforge.com/mysql_master_master_replication - http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers [...]</description> <content:encoded><![CDATA[<p>[...] reading: &#8211; <a
href="http://www.howtoforge.com/mysql_master_master_replication" rel="nofollow">http://www.howtoforge.com/mysql_master_master_replication</a> &#8211; <a
href="http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers" rel="nofollow">http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers</a> [...]</p> ]]></content:encoded> </item> <item><title>By: Kurt Kraut</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1768</link> <dc:creator>Kurt Kraut</dc:creator> <pubDate>Thu, 03 Jun 2010 16:13:37 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1768</guid> <description>SSH can do the job, but OpenVPN is really the best option for a permanent tunnel. It is more resilient than autossh.</description> <content:encoded><![CDATA[<p>SSH can do the job, but OpenVPN is really the best option for a permanent tunnel. It is more resilient than autossh.</p> ]]></content:encoded> </item> <item><title>By: Sidailurch</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1758</link> <dc:creator>Sidailurch</dc:creator> <pubDate>Thu, 06 May 2010 04:20:22 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1758</guid> <description>kat - don&#039;t know if you&#039;re still looking, seeing as how i just stumbled upon this post - but i *think* what you&#039;re looking for is x11vnc - that should do what you want. Hope it helps</description> <content:encoded><![CDATA[<p>kat &#8211; don&#8217;t know if you&#8217;re still looking, seeing as how i just stumbled upon this post &#8211; but i *think* what you&#8217;re looking for is x11vnc &#8211; that should do what you want. Hope it helps</p> ]]></content:encoded> </item> <item><title>By: kat</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1687</link> <dc:creator>kat</dc:creator> <pubDate>Thu, 21 Jan 2010 00:04:54 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1687</guid> <description>I&#039;m still looking for help on related issue....This is scenario:I&#039;m on my laptop, I want to run GUI that is on serverB.
I do not have direct access to serverB.  I do, however, have access to serverA and from there can get to Server B.For comman line stuff...I use putty to get to ServerA, and ssh to ServerB.  How do I set up tunnel to be able to use VNCclient on my laptop to run vncserver on ServerB.I know how to create putty tunnel to serverA in order to run vncserver on serverA.  But how to do it when I have to get to ServerB thru serverA.Anyone?</description> <content:encoded><![CDATA[<p>I&#8217;m still looking for help on related issue&#8230;.This is scenario:</p><p>I&#8217;m on my laptop, I want to run GUI that is on serverB.<br
/> I do not have direct access to serverB.  I do, however, have access to serverA and from there can get to Server B.</p><p>For comman line stuff&#8230;I use putty to get to ServerA, and ssh to ServerB.  How do I set up tunnel to be able to use VNCclient on my laptop to run vncserver on ServerB.</p><p>I know how to create putty tunnel to serverA in order to run vncserver on serverA.  But how to do it when I have to get to ServerB thru serverA.</p><p>Anyone?</p> ]]></content:encoded> </item> <item><title>By: John</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1680</link> <dc:creator>John</dc:creator> <pubDate>Fri, 15 Jan 2010 20:39:58 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1680</guid> <description>I did some slight modification to the checking script, to get rid of the 2 port requirement, and to make it command line parameter driven.#!/bin/bashtunnel_entrance_port=$1
tunnel_end=$2
destination=$3
destination_port=$4## use nc to connect to tunnel entrance port.  If it returns non-zero, then create a new connection
nc -w1 localhost $tunnel_entrance_port
if [[ $? -ne 0 ]]; then
echo Creating new tunnel connection
/usr/bin/ssh -f -N -L $tunnel_entrance_port:$destination:$destination_port $tunnel_end
if [[ $? -eq 0 ]]; then
echo Tunnel to $destination through $tunnel_end created successfully
else
echo An error occurred creating a tunnel to $destination through $tunnel_end was $?
fi
fi</description> <content:encoded><![CDATA[<p>I did some slight modification to the checking script, to get rid of the 2 port requirement, and to make it command line parameter driven.</p><p>#!/bin/bash</p><p>tunnel_entrance_port=$1<br
/> tunnel_end=$2<br
/> destination=$3<br
/> destination_port=$4</p><p>## use nc to connect to tunnel entrance port.  If it returns non-zero, then create a new connection<br
/> nc -w1 localhost $tunnel_entrance_port<br
/> if [[ $? -ne 0 ]]; then<br
/> echo Creating new tunnel connection<br
/> /usr/bin/ssh -f -N -L $tunnel_entrance_port:$destination:$destination_port $tunnel_end<br
/> if [[ $? -eq 0 ]]; then<br
/> echo Tunnel to $destination through $tunnel_end created successfully<br
/> else<br
/> echo An error occurred creating a tunnel to $destination through $tunnel_end was $?<br
/> fi<br
/> fi</p> ]]></content:encoded> </item> <item><title>By: adhit</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1329</link> <dc:creator>adhit</dc:creator> <pubDate>Thu, 06 Aug 2009 09:18:28 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1329</guid> <description>Heya,Thanks for the information :)It really works for me ..</description> <content:encoded><![CDATA[<p>Heya,</p><p>Thanks for the information <img
src='http://www.brandonchecketts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>It really works for me ..</p> ]]></content:encoded> </item> <item><title>By: PermaSSH</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1287</link> <dc:creator>PermaSSH</dc:creator> <pubDate>Mon, 06 Jul 2009 11:09:55 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1287</guid> <description>Thanks for this workaround, but i think kNo has right with his comment or i´m not understand the use of local forwarding.Another issue that´s confusing me is that u don´t use the -i option in your ssh-commands:
/usr/bin/ssh -p 19922 tunnel@localhost ls
AND
/usr/bin/ssh -f -N -L13306:hostb:3306 -L19922:hostb:22 tunnel@hostb
Shouldn´t it be for example: &quot;/usr/bin/ssh -p 19922 - i /home/tunnel/.ssh/id_rsa tunnel@localhost ls&quot; ???</description> <content:encoded><![CDATA[<p>Thanks for this workaround, but i think kNo has right with his comment or i´m not understand the use of local forwarding.</p><p>Another issue that´s confusing me is that u don´t use the -i option in your ssh-commands:<br
/> /usr/bin/ssh -p 19922 tunnel@localhost ls<br
/> AND<br
/> /usr/bin/ssh -f -N -L13306:hostb:3306 -L19922:hostb:22 tunnel@hostb<br
/> Shouldn´t it be for example: &#8220;/usr/bin/ssh -p 19922 &#8211; i /home/tunnel/.ssh/id_rsa tunnel@localhost ls&#8221; ???</p> ]]></content:encoded> </item> <item><title>By: kNo</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1167</link> <dc:creator>kNo</dc:creator> <pubDate>Thu, 12 Mar 2009 12:03:08 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1167</guid> <description>Thanks for the code, but there is a mistake:
/usr/bin/ssh -f -N -L13306:hostb:3306 -L19922:hostb:22 tunnel@hostb
sould be
/usr/bin/ssh -f -N -L13306:hosta:3306 -L19922:hosta:22 tunnel@hostb
or  /usr/bin/ssh -f -N -L13306:localhost:3306 -L19922:localhost:22 tunnel@hostb
or
/usr/bin/ssh -f -N -L13306:127.0.0.1:3306 -L19922:127.0.0.1:22 tunnel@hostbGreets from spain</description> <content:encoded><![CDATA[<p>Thanks for the code, but there is a mistake:<br
/> /usr/bin/ssh -f -N -L13306:hostb:3306 -L19922:hostb:22 tunnel@hostb<br
/> sould be<br
/> /usr/bin/ssh -f -N -L13306:hosta:3306 -L19922:hosta:22 tunnel@hostb<br
/> or  /usr/bin/ssh -f -N -L13306:localhost:3306 -L19922:localhost:22 tunnel@hostb<br
/> or<br
/> /usr/bin/ssh -f -N -L13306:127.0.0.1:3306 -L19922:127.0.0.1:22 tunnel@hostb</p><p>Greets from spain</p> ]]></content:encoded> </item> <item><title>By: Matt</title><link>http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers/comment-page-1#comment-1166</link> <dc:creator>Matt</dc:creator> <pubDate>Wed, 11 Mar 2009 23:37:59 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=186#comment-1166</guid> <description>I run multiple ssh tunnels between our internal servers and cloud-based (e.g. EC2) servers and have found autossh to be the cat&#039;s meow.  Check it out  http://www.harding.motd.ca/autossh/</description> <content:encoded><![CDATA[<p>I run multiple ssh tunnels between our internal servers and cloud-based (e.g. EC2) servers and have found autossh to be the cat&#8217;s meow.  Check it out <a
href="http://www.harding.motd.ca/autossh/" rel="nofollow">http://www.harding.motd.ca/autossh/</a></p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 5/22 queries in 0.013 seconds using disk

Served from: www.brandonchecketts.com @ 2012-02-07 18:22:54 -->
