<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>~chuck/blog &#187; OpenSolaris</title>
	<atom:link href="http://www.ozymo.com/explosions/tag/opensolaris/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ozymo.com</link>
	<description>What more could you want?</description>
	<lastBuildDate>Tue, 17 Oct 2023 03:57:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>OpenSolaris as Synergy Host</title>
		<link>http://www.ozymo.com/explosions/174</link>
		<comments>http://www.ozymo.com/explosions/174#comments</comments>
		<pubDate>Wed, 22 Oct 2008 20:00:09 +0000</pubDate>
		<dc:creator>chuck</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Synergy]]></category>

		<guid isPermaLink="false">http://www.ozymo.com/~chuck/blog/?p=174</guid>
		<description><![CDATA[UPDATE 081205: Adding &#8220;AllowTcpForwarding&#8221; to the sshd_config and restarting SSH should enable port forwarding, as it is disabled by default. &#8211; I have installed OpenSolaris on my Gateway MT3705 notebook.  I know.  I must be a glutton for punishment. I have a Dell desktop that I also use, and like to have my laptop be]]></description>
			<content:encoded><![CDATA[<p>UPDATE 081205: Adding &#8220;AllowTcpForwarding&#8221; to the sshd_config and restarting SSH should enable port forwarding, as it is disabled by default.</p>
<p>&#8211;</p>
<p>I have installed <a title="OpenSolaris Website" href="http://opensolaris.org/os/" target="_blank">OpenSolaris</a> on my <a title="NewEgg listing for Gateway MT3705" href="http://www.newegg.com/Product/Product.aspx?Item=N82E16834101053" target="_blank">Gateway MT3705</a> notebook.  I know.  I must be a glutton for punishment.</p>
<p>I have a Dell desktop that I also use, and like to have my laptop be the &#8220;control center&#8221;.  I accomplish this by using <a title="Synergy Homepage" href="http://synergy2.sourceforge.net/" target="_blank">Synergy</a> through an <a title="Wikipedia Article" href="http://en.wikipedia.org/wiki/Tunneling_protocol" target="_blank">SSH tunnel</a>.  Today was the first time I tried to use OpenSolaris as the host for my Synergy setup.  And it failed miserably.</p>
<p>After some googling, I found out that the SSH package in OpenSolaris is broken.  It doesn&#8217;t allow for correct SSH tunneling.  Here are some <a title="OpenSOlaris Forums" href="http://opensolaris.org/jive/thread.jspa?threadID=71571&amp;tstart=0" target="_blank">links</a> for <a title="OpenSolaris Bugs" href="http://bugs.opensolaris.org/view_bug.do;jsessionid=549e2d4699fdc675206695872a?bug_id=5039669" target="_blank">reference</a>.</p>
<p>I run Debian on my desktop machine at present.  I&#8217;ve run SSH tunnels between my laptop and desktop while both were running Debian.  No problem.  I&#8217;ve set up an alias in my .bashrc on each of my boxes so that I don&#8217;t have to type the whole command each time:</p>
<blockquote><p>alias synsetup=&#8217;ssh -f -N -L 24800:host:24800 host &amp;&amp; synergyc localhost&#8217;</p></blockquote>
<p>Obviously, this assumes that the host and client are already correctly configured.  I&#8217;ve <a title="~chuck/bog: Secure Synergy" href="http://www.ozymo.com/~chuck/blog/archives/122" target="_self">discussed this previously</a>.</p>
<p>So, I compiled and configured synergy in OpenSolaris, and tried to run the synergys command: No problem.  It runs fine, and works great on it&#8217;s own, outside of an SSH tunnel.  I can connect from the client without issue:</p>
<blockquote><p>$ ps -ef | grep synergys<br />
chuck  1159     1   0 19:44:13 ?           0:00 synergys</p>
<p>$ netstat -an | grep 24800<br />
*.24800              *.*                0      0 49152      0 LISTEN<br />
10.6.101.176.24800   10.6.101.174.38334    9088      0 49232      0 ESTABLISHED</p></blockquote>
<p>But, running Synergy all alone transmits information between the two host over the network in plain text.  So, it&#8217;s best to <a title="Synergy Security Page" href="http://synergy2.sourceforge.net/security.html" target="_blank">run Synergy through an SSH tunnel</a>.</p>
<p>Here&#8217;s a smattering of what I get when I follow the instructions from Synergy&#8217;s site on setting up the client through an SSH tunnel:</p>
<blockquote><p>$ synergyc -f localhost<br />
INFO: synergyc.cpp,716: Synergy client 1.3.1 on Linux 2.6.26-1-686 #1 SMP Thu Oct 9 15:18:09 UTC 2008 i686<br />
DEBUG: CXWindowsScreen.cpp,841: XOpenDisplay(&#8220;:0.0&#8243;)<br />
DEBUG: CXWindowsScreenSaver.cpp,339: xscreensaver window: 0&#215;00000000<br />
DEBUG: CXWindowsScreen.cpp,111: screen shape: 0,0 2560&#215;1024 (xinerama)<br />
DEBUG: CXWindowsScreen.cpp,112: window is 0&#215;03400004<br />
DEBUG: CScreen.cpp,38: opened display<br />
NOTE: synergyc.cpp,330: started client<br />
channel 2: open failed: administratively prohibited: open failed<br />
NOTE: synergyc.cpp,276: disconnected from server<br />
. . . (until Ctrl-C)<br />
^CDEBUG: CScreen.cpp,49: closed display<br />
NOTE: synergyc.cpp,408: stopped client</p></blockquote>
<p>So, I <a title="Google Search" href="http://www.google.com/search?ie=UTF-8&amp;oe=UTF-8&amp;sourceid=navclient&amp;gfns=1&amp;q=channel+2%3A+open+failed%3A+administratively+prohibited%3A+open+failed" target="_blank">googled the error message</a>.  The first link shed some light. I dug farther, and found the links I posted above.</p>
<p>So, tunneling is broke on OpenSolaris, but works fine on Debian.  Why not <a title="Wikipedia Article" href="http://en.wikipedia.org/wiki/Reverse_connection" target="_blank">reverse</a> it? I set up this alias on my OpenSolaris laptop, to start the Synergy server.  It creates a reverse tunnel to the desktop machine, which runs Debian:</p>
<blockquote><p>synserver_setup=&#8217;/usr/local/bin/synergys &amp;&amp; ssh -f -N -R 24800:localhost:24800 chuck@client&#8217;</p></blockquote>
<p>The only thing that&#8217;s different is the direction from which the tunnel is created.  To tunnel from the client to the server from the client, the &#8216;-L&#8217; flag is used to create the local tunnel.  To tunnel from the client to the server from the server, the &#8216;-R&#8217; flag is used to create the remote tunnel.  All set.</p>
<p>/cs</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozymo.com/explosions/174/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
