<?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 Restricted SSH User for SSH Tunneling Only</title>
	<atom:link href="http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/</link>
	<description>Andreas Breitschopp</description>
	<lastBuildDate>Fri, 04 Jan 2013 06:48:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Chris Davies</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-192</link>
		<dc:creator>Chris Davies</dc:creator>
		<pubDate>Fri, 27 Apr 2012 11:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-192</guid>
		<description>I&#039;ve just created a user account on my local system with /bin/rbash as the shell. The profile contains two lines
&lt;code&gt;
test -d &quot;$HOME/bin&quot; &amp;&amp; PATH=&quot;$HOME/bin&quot;
echo &quot;Restricted shell... you&#039;re welcome&quot;
&lt;/code&gt;

On my second try I was able to hit Ctrl/C at the right moment to stop the PATH being reset.

This is definitely a security hole, and arguably a bug. If you trust your users not to exploit it, then you might as well not bother with rbash in the first place.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve just created a user account on my local system with /bin/rbash as the shell. The profile contains two lines<br />
<code><br />
test -d "$HOME/bin" &amp;&amp; PATH="$HOME/bin"<br />
echo "Restricted shell... you're welcome"<br />
</code></p>
<p>On my second try I was able to hit Ctrl/C at the right moment to stop the PATH being reset.</p>
<p>This is definitely a security hole, and arguably a bug. If you trust your users not to exploit it, then you might as well not bother with rbash in the first place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Breitschopp</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-191</link>
		<dc:creator>Andreas Breitschopp</dc:creator>
		<pubDate>Fri, 27 Apr 2012 07:40:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-191</guid>
		<description>Hello Chris,

first thanks for your comment.

Maybe you&#039;re right that there is a theoretical chance for a user to cancel the execution of the .profile script before setting path=&quot;&quot;, but you will agree that there is no way that a &quot;real&quot; user is able to hit Ctrl+C fast enough that this simple line is not executed. And this tip here is intended to be for &quot;real&quot; users that has the right to login for SSH tunneling, but should not be able to do any other things on the server. For this purpose this solution should be definitely enough.

Best regards
Andreas</description>
		<content:encoded><![CDATA[<p>Hello Chris,</p>
<p>first thanks for your comment.</p>
<p>Maybe you&#8217;re right that there is a theoretical chance for a user to cancel the execution of the .profile script before setting path=&#8221;", but you will agree that there is no way that a &#8220;real&#8221; user is able to hit Ctrl+C fast enough that this simple line is not executed. And this tip here is intended to be for &#8220;real&#8221; users that has the right to login for SSH tunneling, but should not be able to do any other things on the server. For this purpose this solution should be definitely enough.</p>
<p>Best regards<br />
Andreas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Davies</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-190</link>
		<dc:creator>Chris Davies</dc:creator>
		<pubDate>Fri, 27 Apr 2012 00:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-190</guid>
		<description>Last time I tried to use rbash as a login shell, I could not find any way of preventing the user from hitting Ctrl/C and interrupting the execution of .bash_profile or .profile. (This is at odds with the original sh/rsh implementation, which notes that Ctrl/C is disabled while the .profile is executed.) So you cannot guarantee that any configuration in either of these files intended to restrict the user further will actually be executed.

Pathologically, even a &lt;code&gt;trap &quot;&quot; 3&lt;/code&gt; at the top of the file could be interrupted.

The only solution I found for this was to use a restricted bourne shell (rsh) and have &lt;code&gt;trap &quot;&quot; 3; exec bash&lt;/code&gt; within the .profile and to remember to put all the subsequent bash code inside .bashrc</description>
		<content:encoded><![CDATA[<p>Last time I tried to use rbash as a login shell, I could not find any way of preventing the user from hitting Ctrl/C and interrupting the execution of .bash_profile or .profile. (This is at odds with the original sh/rsh implementation, which notes that Ctrl/C is disabled while the .profile is executed.) So you cannot guarantee that any configuration in either of these files intended to restrict the user further will actually be executed.</p>
<p>Pathologically, even a <code>trap "" 3</code> at the top of the file could be interrupted.</p>
<p>The only solution I found for this was to use a restricted bourne shell (rsh) and have <code>trap "" 3; exec bash</code> within the .profile and to remember to put all the subsequent bash code inside .bashrc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Breitschopp</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-164</link>
		<dc:creator>Andreas Breitschopp</dc:creator>
		<pubDate>Wed, 14 Mar 2012 10:33:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-164</guid>
		<description>Hello,

if you don&#039;t want other users to use your service from a proxy (e. g. by SSH tunneling), I see no chance for that, because your service does not know if the client is a &quot;normal&quot; request or a request being tunneled through a SSH proxy.

Best regards
Andreas</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>if you don&#8217;t want other users to use your service from a proxy (e. g. by SSH tunneling), I see no chance for that, because your service does not know if the client is a &#8220;normal&#8221; request or a request being tunneled through a SSH proxy.</p>
<p>Best regards<br />
Andreas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KY</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-163</link>
		<dc:creator>KY</dc:creator>
		<pubDate>Wed, 14 Mar 2012 10:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-163</guid>
		<description>I sorry I may still have been unclear  Ian look to keep people out</description>
		<content:encoded><![CDATA[<p>I sorry I may still have been unclear  Ian look to keep people out</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KY</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-162</link>
		<dc:creator>KY</dc:creator>
		<pubDate>Wed, 14 Mar 2012 10:30:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-162</guid>
		<description>Ian sorry for..being misunderstood, I wanted to block other users from the server. thanks for..the fast response
KY</description>
		<content:encoded><![CDATA[<p>Ian sorry for..being misunderstood, I wanted to block other users from the server. thanks for..the fast response<br />
KY</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Breitschopp</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-161</link>
		<dc:creator>Andreas Breitschopp</dc:creator>
		<pubDate>Wed, 14 Mar 2012 10:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-161</guid>
		<description>Hello,

you need to be a little bit more precise in your question:
do you want to block a SSH user from using this SSH server as tunneling server or do you want to block other people to use your service from a tunneling server as proxy?

Best regards
Andreas</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>you need to be a little bit more precise in your question:<br />
do you want to block a SSH user from using this SSH server as tunneling server or do you want to block other people to use your service from a tunneling server as proxy?</p>
<p>Best regards<br />
Andreas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KY</title>
		<link>http://www.ab-weblog.com/en/creating-a-restricted-ssh-user-for-ssh-tunneling-only/#comment-160</link>
		<dc:creator>KY</dc:creator>
		<pubDate>Wed, 14 Mar 2012 10:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=453#comment-160</guid>
		<description>hello  my..freind, I wanted to know is there a way to block tunnel access altogether . ?

thx for your time . 
8071242@gmail.com 
KY</description>
		<content:encoded><![CDATA[<p>hello  my..freind, I wanted to know is there a way to block tunnel access altogether . ?</p>
<p>thx for your time .<br />
<a href="mailto:8071242@gmail.com">8071242@gmail.com</a><br />
KY</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->