<?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>LosByers- Interesting Musings Helpful Hints from a Unix System Administrator &#187; SSH</title>
	<atom:link href="http://losbyers.com/wordpress/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://losbyers.com/wordpress</link>
	<description>All the info I need</description>
	<lastBuildDate>Wed, 01 Sep 2010 19:48:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SSH Tunneling How-To</title>
		<link>http://losbyers.com/wordpress/2009/12/ssh-tunneling-how-to/</link>
		<comments>http://losbyers.com/wordpress/2009/12/ssh-tunneling-how-to/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 21:32:20 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=17</guid>
		<description><![CDATA[<p>First there are a couple scenarios for the tunnel.</p>
<p>Out_host  -&#62; Gateway -&#62; Other_host</p>
<p>In this sense you want to get to the other host or to a port on another host.</p>
<p>Use: ssh -L local_listen_port:gateway:gateway_port Other_host</p>
<p>Remote forwarding is used to skip past systems to a destination. You can then use the ssh -p port $user@localhost to [...]]]></description>
			<content:encoded><![CDATA[<p><span>First there are a couple scenarios for the tunnel.</p>
<p>Out_host  -&gt; Gateway -&gt; Other_host</p>
<p>In this sense you want to get to the other host or to a port on another host.</p>
<p>Use: <span style="font-weight: bold;">ssh -L local_listen_port:gateway:gateway_port Other_host</span></p>
<p>Remote forwarding is used to skip past systems to a destination. You can then use the ssh -p port $user@localhost to ssh back to the original system.</p>
<p><span style="font-weight: bold;">ssh -R destination_port:localhost:local_port destination_host </span></p>
<p><span style="font-weight: bold;">ssh -R remote_port:localhost:22 your_dest_computer</span></p>
<p>ex. $ ssh -R 2048:localhost:22 other.computer.com</p>
<p>Real Life: ssh from adm3 to www2, then ssh back from www2.<br />
On adm3: <span style="font-weight: bold;">ssh -R 2222:localhost:22 www2 </span> (This logs you into www2)<br />
From www2: <span style="font-weight: bold;">ssh -p 2222 localhost </span> (This logs you back into adm3)</p>
<p>Oh now we get tricky.<br />
Set up a local port on www2 so that you could use adm3 as a ssh gateway.<br />
<span style="font-weight: bold;">ssh -p 2222 -L 7777:Other_host:22 localhost</span></p>
<p>(ssh to the local port 2222 on localhost, set a new local port 7777 that will pass through port 22 on Other_host(Alternate dest host) )</p>
<p>Now you could log into Other_host from www2.</p>
<p><span style="font-weight: bold;">ssh -l $user -p 7777 localhost </span> (Connects me to Other_host)</p>
<p>More info:<br />
<a href="http://www.linuxtutorialblog.com/post/ssh-and-scp-howto-tips-tricks" target="_blank">http://www.linuxtutorialblog.com/post/ssh-and-scp-howto-tips-tricks</a></p>
<p>You can use a piped scp. This will set the source and destination as $user@$host:/$path The $user, $host and $path can all be differnet.</p>
<p><span style="font-weight: bold;">scp -pr $user1@host1.com:/path/* $user2@host2.net:/dest_path/</span></span></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Fssh-tunneling-how-to%2F&amp;linkname=SSH%20Tunneling%20How-To"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/ssh-tunneling-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
