<?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/"
	xmlns:series="http://organizeseries.com/"
		>
<channel>
	<title>Comments on: Ssh Port Forwarding and &#8220;channel 3: open failed: connect failed: Connection refused&#8221;</title>
	<atom:link href="http://www.debuntu.org/ssh-port-forwarding-and-channel-3-open-failed-connect-failed-connection-refused/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.debuntu.org/ssh-port-forwarding-and-channel-3-open-failed-connect-failed-connection-refused/</link>
	<description>Debian/Ubuntu Tips and Tricks</description>
	<lastBuildDate>Fri, 14 Jun 2013 15:43:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: philpirj</title>
		<link>http://www.debuntu.org/ssh-port-forwarding-and-channel-3-open-failed-connect-failed-connection-refused/#comment-2</link>
		<dc:creator>philpirj</dc:creator>
		<pubDate>Wed, 19 Jan 2011 20:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.debuntu.org/?p=347#comment-2</guid>
		<description><![CDATA[ssh -f -N -L 5432:localhost:5432 user@host.com
what&#039;s the point of verbose output when running in background? either set -v either -f]]></description>
		<content:encoded><![CDATA[<p>ssh -f -N -L 5432:localhost:5432 <a href="mailto:user@host.com">user@host.com</a></p>
<p>what&#8217;s the point of verbose output when running in background? either set -v either -f</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robertjmoore</title>
		<link>http://www.debuntu.org/ssh-port-forwarding-and-channel-3-open-failed-connect-failed-connection-refused/#comment-1</link>
		<dc:creator>robertjmoore</dc:creator>
		<pubDate>Tue, 06 Jan 2009 16:55:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.debuntu.org/?p=347#comment-1</guid>
		<description><![CDATA[I grappled with this issue for several hours yesterday and this post helped a lot-- thank you.  I eventually got it working by matching the &quot;remote address&quot; in the SSH command to the bind-address value in the my.cnf file on the remote server.  For most people, the bind-address value is 127.0.0.1, but I have my MySQL server bound to a local network address (192.168.0.x).  The correct command for me, therefore, was:
&lt;code&gt;ssh -v -f -N -L 3307:192.168.0.1:3306 user@host.server.com&lt;/code&gt;
It seems that the &quot;remote address&quot; in the SSH command is the value used by MySQL to associate the tunneled user with an IP address.  Depending on your configuration, MySQL likely either refuses connections from remote IPs or only allows the user you are logging in as to log in from locahost.  Since we can&#039;t self-identify as &quot;localhost&quot; (we have to force TCP activity) we need to use an IP address, and that IP address needs to be whatever MySQL identifies as its own.  This is the value of bind-address.  In many cases, this is going to be 127.0.0.1 (that&#039;s why you see this proposed solution everywhere), but that&#039;s not always the case.  Check your bind-address value!
In short, if you&#039;re getting an error in the the &quot;Channel x open failed: connect failed: Connection refused&quot; universe, make sure that the &quot;remote address&quot; in your ssh command matches the bind-address value on your remote machine.
Here are my full notes from yesterday: &lt;a href=&quot;http://themetricsystem.rjmetrics.com/2009/01/06/php-mysql-and-ssh-tunneling-port-forwarding/&quot; rel=&quot;nofollow&quot;&gt;http://themetricsystem.rjmetrics.com/2009/01/06/php-mysql-and-ssh-tunneling-port-forwarding/&lt;/a&gt;
I hope this is helpful to someone.]]></description>
		<content:encoded><![CDATA[<p>I grappled with this issue for several hours yesterday and this post helped a lot&#8211; thank you.  I eventually got it working by matching the &#8220;remote address&#8221; in the SSH command to the bind-address value in the my.cnf file on the remote server.  For most people, the bind-address value is 127.0.0.1, but I have my MySQL server bound to a local network address (192.168.0.x).  The correct command for me, therefore, was:</p>
<p><code>ssh -v -f -N -L 3307:192.168.0.1:3306 <a href="mailto:user@host.server.com">user@host.server.com</a></code></p>
<p>It seems that the &#8220;remote address&#8221; in the SSH command is the value used by MySQL to associate the tunneled user with an IP address.  Depending on your configuration, MySQL likely either refuses connections from remote IPs or only allows the user you are logging in as to log in from locahost.  Since we can&#8217;t self-identify as &#8220;localhost&#8221; (we have to force TCP activity) we need to use an IP address, and that IP address needs to be whatever MySQL identifies as its own.  This is the value of bind-address.  In many cases, this is going to be 127.0.0.1 (that&#8217;s why you see this proposed solution everywhere), but that&#8217;s not always the case.  Check your bind-address value!</p>
<p>In short, if you&#8217;re getting an error in the the &#8220;Channel x open failed: connect failed: Connection refused&#8221; universe, make sure that the &#8220;remote address&#8221; in your ssh command matches the bind-address value on your remote machine.</p>
<p>Here are my full notes from yesterday: <a href="http://themetricsystem.rjmetrics.com/2009/01/06/php-mysql-and-ssh-tunneling-port-forwarding/" rel="nofollow">http://themetricsystem.rjmetrics.com/2009/01/06/php-mysql-and-ssh-tunneling-port-forwarding/</a></p>
<p>I hope this is helpful to someone.</p>
]]></content:encoded>
	</item>
</channel>
</rss>