<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Netcat &#8211; a couple of useful examples</title>
	<atom:link href="http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Tue, 21 May 2013 19:34:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Charlie Hendricks</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19417</link>
		<dc:creator>Charlie Hendricks</dc:creator>
		<pubDate>Wed, 30 Jan 2013 04:40:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19417</guid>
		<description><![CDATA[Thanks.  Saved me a bunch of time!  Hard to remember these little gems.]]></description>
		<content:encoded><![CDATA[<p>Thanks.  Saved me a bunch of time!  Hard to remember these little gems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LessWire</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19413</link>
		<dc:creator>LessWire</dc:creator>
		<pubDate>Tue, 08 Jan 2013 01:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19413</guid>
		<description><![CDATA[I found it, the difference is:
My version of telnet seems to send &quot;\r\n&quot; after each line (for Win compatibility), netcat behaves like it should be and sends only &quot;\n&quot; for line termination. 

So the amplifier didn&#039;t execute the command, better to do something like this:

&quot;echo -e somecommand\r &#124; netcat yamaha 50000&quot;]]></description>
		<content:encoded><![CDATA[<p>I found it, the difference is:<br />
My version of telnet seems to send &#8220;\r\n&#8221; after each line (for Win compatibility), netcat behaves like it should be and sends only &#8220;\n&#8221; for line termination. </p>
<p>So the amplifier didn&#8217;t execute the command, better to do something like this:</p>
<p>&#8220;echo -e somecommand\r | netcat yamaha 50000&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LessWire</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19412</link>
		<dc:creator>LessWire</dc:creator>
		<pubDate>Mon, 07 Jan 2013 06:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19412</guid>
		<description><![CDATA[I want to use netcat like your example to send commands to a yamaha amplifier. It works fine with telnet:

telnet yamaha 50000
and i get the replies from the amplifier for each command.

But with netcat it wont work:

netcat yamaha 50000
and i don&#039;t receive any replies to my commands, although your example with dict.org works fine. 

What could there be different to telnet?]]></description>
		<content:encoded><![CDATA[<p>I want to use netcat like your example to send commands to a yamaha amplifier. It works fine with telnet:</p>
<p>telnet yamaha 50000<br />
and i get the replies from the amplifier for each command.</p>
<p>But with netcat it wont work:</p>
<p>netcat yamaha 50000<br />
and i don&#8217;t receive any replies to my commands, although your example with dict.org works fine. </p>
<p>What could there be different to telnet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EvilTwin</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19403</link>
		<dc:creator>EvilTwin</dc:creator>
		<pubDate>Wed, 05 Dec 2012 17:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19403</guid>
		<description><![CDATA[Nice Write up!

In the first example it will not work as 
nc -l 3333
needs to be
nc -l -p3333

At least my debian system needs it that way!]]></description>
		<content:encoded><![CDATA[<p>Nice Write up!</p>
<p>In the first example it will not work as<br />
nc -l 3333<br />
needs to be<br />
nc -l -p3333</p>
<p>At least my debian system needs it that way!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Sanders</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19390</link>
		<dc:creator>Greg Sanders</dc:creator>
		<pubDate>Fri, 26 Oct 2012 12:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19390</guid>
		<description><![CDATA[Thanks for taking time to write this up.  It saved me a huge amount of time and frustration trying to move a 40G .vdi file from one machine to another.  I&#039;ve added your site to my RSS reader list.]]></description>
		<content:encoded><![CDATA[<p>Thanks for taking time to write this up.  It saved me a huge amount of time and frustration trying to move a 40G .vdi file from one machine to another.  I&#8217;ve added your site to my RSS reader list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jabber</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19358</link>
		<dc:creator>jabber</dc:creator>
		<pubDate>Tue, 03 Jul 2012 11:28:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-19358</guid>
		<description><![CDATA[good one !]]></description>
		<content:encoded><![CDATA[<p>good one !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbert Hamburg</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-7086</link>
		<dc:creator>Robbert Hamburg</dc:creator>
		<pubDate>Fri, 02 Mar 2007 11:47:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-7086</guid>
		<description><![CDATA[Hmm that comment of gary was very usefull to me !

Thanks !]]></description>
		<content:encoded><![CDATA[<p>Hmm that comment of gary was very usefull to me !</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-5467</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Fri, 05 Jan 2007 15:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-5467</guid>
		<description><![CDATA[The main drawback of netcat is that it needs to be started on both sides of the wire to make a transfer work. What I usually do is this:

tar cz /etc &#124; ssh user@host -c &#039;cd /bak ; cat &gt; etc.tgz&#039;

On the localhost, this will create an archive of /etc, which is piped into an ssh connection. On the remote host, the snippet enclosed in &#039;&#039; is executed: Change to the backup directory, and pipe the content of the connection into a file. If I wanted to extract the files again on the receiving side, I could do:

tar cz /etc &#124; ssh user@host -c &#039;cd /bak ; cat tar xz&#039;

Note that the &#039;-f -&#039; given in the article is redundant. If tar is not given a file, it uses STDIN/OUT. The advantage over recursive scp is that this method preserves device nodes and file permissions. The advantage over rsync is that it is using familiar tar semantics on both sides (of course, if you want diffing, you need rsync, which works just fine over SSH).

Of course, the other direction (pulling files from a host) is equally possible:

ssh user@host -c &#039;tar cz /etc&#039; &gt; /bak/etc.tgz]]></description>
		<content:encoded><![CDATA[<p>The main drawback of netcat is that it needs to be started on both sides of the wire to make a transfer work. What I usually do is this:</p>
<p>tar cz /etc | ssh user@host -c &#8216;cd /bak ; cat &gt; etc.tgz&#8217;</p>
<p>On the localhost, this will create an archive of /etc, which is piped into an ssh connection. On the remote host, the snippet enclosed in &#8221; is executed: Change to the backup directory, and pipe the content of the connection into a file. If I wanted to extract the files again on the receiving side, I could do:</p>
<p>tar cz /etc | ssh user@host -c &#8216;cd /bak ; cat tar xz&#8217;</p>
<p>Note that the &#8216;-f -&#8217; given in the article is redundant. If tar is not given a file, it uses STDIN/OUT. The advantage over recursive scp is that this method preserves device nodes and file permissions. The advantage over rsync is that it is using familiar tar semantics on both sides (of course, if you want diffing, you need rsync, which works just fine over SSH).</p>
<p>Of course, the other direction (pulling files from a host) is equally possible:</p>
<p>ssh user@host -c &#8216;tar cz /etc&#8217; &gt; /bak/etc.tgz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cucirca</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-5453</link>
		<dc:creator>Cucirca</dc:creator>
		<pubDate>Thu, 04 Jan 2007 16:44:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-5453</guid>
		<description><![CDATA[Thanks for this useful commands ;)]]></description>
		<content:encoded><![CDATA[<p>Thanks for this useful commands ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GNot</title>
		<link>http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-5123</link>
		<dc:creator>GNot</dc:creator>
		<pubDate>Mon, 27 Nov 2006 09:21:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/#comment-5123</guid>
		<description><![CDATA[Thanks. There are indeed many ways to use netcat effectively. Very interesting.
]]></description>
		<content:encoded><![CDATA[<p>Thanks. There are indeed many ways to use netcat effectively. Very interesting.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 244/259 objects using apc

Served from: www.g-loaded.eu @ 2013-05-26 06:09:01 -->