http://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&feed=atom&action=historyTalk:SSH, limiting to SCP or Rsync only - Revision history2024-03-29T13:04:23ZRevision history for this page on the wikiMediaWiki 1.18.0http://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=11631&oldid=prevJimbo: moved Talk:SSH: Limiting to SCP or Rsync only to Talk:SSH, limiting to SCP or Rsync only2010-01-16T14:38:23Z<p>moved <a href="/index.php/Talk:SSH:_Limiting_to_SCP_or_Rsync_only" class="mw-redirect" title="Talk:SSH: Limiting to SCP or Rsync only">Talk:SSH: Limiting to SCP or Rsync only</a> to <a href="/index.php/Talk:SSH,_limiting_to_SCP_or_Rsync_only" title="Talk:SSH, limiting to SCP or Rsync only">Talk:SSH, limiting to SCP or Rsync only</a></p>
<table class='diff diff-contentalign-left'>
<tr valign='top'>
<td colspan='1' style="background-color: white; color:black;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black;">Revision as of 14:38, 16 January 2010</td>
</tr></table>Jimbohttp://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=9337&oldid=prevIce: /* Security aspect */2007-11-04T10:06:03Z<p><span class="autocomment">Security aspect</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 10:06, 4 November 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 38:</td>
<td colspan="2" class="diff-lineno">Line 38:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>You should probably not rely on scpftprsynconly to PREVENT users from executing programs on your machine,</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>You should probably not rely on scpftprsynconly to PREVENT users from executing programs on your machine,</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  ./scpsftprsynconly foo 'scp -S givemeshell asd asd:asd'  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  ./scpsftprsynconly foo 'scp -S givemeshell asd asd:asd'  </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>Will execute the givemeshell command with some obscure arguments. <del class="diffchange diffchange-inline">I haven't tried it with scpftprsynconly installed as </del>a shell <del class="diffchange diffchange-inline">but it should be as easy as </del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>Will execute the givemeshell command with some obscure arguments. <ins class="diffchange diffchange-inline">To get </ins>a shell <ins class="diffchange diffchange-inline">with this inplace, upload a script/program that reverse connect or what you want then just:</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  ssh <del class="diffchange diffchange-inline">foohost '</del>scp -S <del class="diffchange diffchange-inline">givemeshell'.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>  ssh <ins class="diffchange diffchange-inline">foo@barhost "</ins>scp -S <ins class="diffchange diffchange-inline">echo asd asd:asd"</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Probably should mention this in the article..</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Probably should mention this in the article..</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Ice|Ice]] 04:51, 4 November 2007 (EST)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Ice|Ice]] 04:51, 4 November 2007 (EST)</div></td></tr>
</table>Icehttp://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=9336&oldid=prevIce: security concern with scpftprsynconly2007-11-04T09:51:42Z<p>security concern with scpftprsynconly</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 09:51, 4 November 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 34:</td>
<td colspan="2" class="diff-lineno">Line 34:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The problem you were having was that a good samaritan who manually edited the article to remove spam accidentally damaged the code a while back.  I looked through history on the article and reverted to prior to the damage.  --[[User:Jimbo|Jimbo]] 15:20, 22 October 2007 (EDT)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The problem you were having was that a good samaritan who manually edited the article to remove spam accidentally damaged the code a while back.  I looked through history on the article and reverted to prior to the damage.  --[[User:Jimbo|Jimbo]] 15:20, 22 October 2007 (EDT)</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== Security aspect == </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">You should probably not rely on scpftprsynconly to PREVENT users from executing programs on your machine,</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> ./scpsftprsynconly foo 'scp -S givemeshell asd asd:asd' </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Will execute the givemeshell command with some obscure arguments. I haven't tried it with scpftprsynconly installed as a shell but it should be as easy as </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> ssh foohost 'scp -S givemeshell'.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Probably should mention this in the article..</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">--[[User:Ice|Ice]] 04:51, 4 November 2007 (EST)</ins></div></td></tr>
</table>Icehttp://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=9192&oldid=prevJimbo at 19:21, 22 October 20072007-10-22T19:21:57Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:21, 22 October 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 31:</td>
<td colspan="2" class="diff-lineno">Line 31:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Dave|Dave]] 13:41, 22 October 2007 (EDT)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Dave|Dave]] 13:41, 22 October 2007 (EDT)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>== <del class="diffchange diffchange-inline">pretty clearly </del>a <del class="diffchange diffchange-inline">characterset problem </del>==</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>== <ins class="diffchange diffchange-inline">somebody oopsed on </ins>a <ins class="diffchange diffchange-inline">kill-the-spam edit </ins>==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">I dunno what you're cutting and pasting with, but I suggest you use a command line tool.  That AE crap is charset problem all the way.  --[[User:Jimbo|Jimbo]] 15:17, 22 October 2007 (EDT) edit: nm, that's a charset problem from pasting HERE not vice versa.  </del>The problem you were having was that a <del class="diffchange diffchange-inline">spammer </del>damaged the code a while back.  I looked through history on the article and reverted to prior to the damage.  --[[User:Jimbo|Jimbo]] 15:20, 22 October 2007 (EDT)</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>The problem you were having was that a <ins class="diffchange diffchange-inline">good samaritan who manually edited the article to remove spam accidentally </ins>damaged the code a while back.  I looked through history on the article and reverted to prior to the damage.  --[[User:Jimbo|Jimbo]] 15:20, 22 October 2007 (EDT)</div></td></tr>
</table>Jimbohttp://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=9191&oldid=prevJimbo at 19:20, 22 October 20072007-10-22T19:20:21Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:20, 22 October 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 33:</td>
<td colspan="2" class="diff-lineno">Line 33:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== pretty clearly a characterset problem ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== pretty clearly a characterset problem ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>I dunno what you're cutting and pasting with, but I suggest you use a command line tool.  That AE crap is charset problem all the way.  --[[User:Jimbo|Jimbo]] 15:17, 22 October 2007 (EDT)</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>I dunno what you're cutting and pasting with, but I suggest you use a command line tool.  That AE crap is charset problem all the way.  --[[User:Jimbo|Jimbo]] 15:17<ins class="diffchange diffchange-inline">, 22 October 2007 (EDT) edit: nm, that's a charset problem from pasting HERE not vice versa.  The problem you were having was that a spammer damaged the code a while back.  I looked through history on the article and reverted to prior to the damage.  --[[User:Jimbo|Jimbo]] 15:20</ins>, 22 October 2007 (EDT)</div></td></tr>
<!-- diff cache key bsdwiki:diff:version:1.11a:oldid:9189:newid:9191 -->
</table>Jimbohttp://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=9189&oldid=prevJimbo: pretty clearly a characterset problem2007-10-22T19:17:40Z<p>pretty clearly a characterset problem</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:17, 22 October 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 30:</td>
<td colspan="2" class="diff-lineno">Line 30:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Dave|Dave]] 13:41, 22 October 2007 (EDT)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Dave|Dave]] 13:41, 22 October 2007 (EDT)</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== pretty clearly a characterset problem ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">I dunno what you're cutting and pasting with, but I suggest you use a command line tool.  That AE crap is charset problem all the way.  --[[User:Jimbo|Jimbo]] 15:17, 22 October 2007 (EDT)</ins></div></td></tr>
</table>Jimbohttp://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=9188&oldid=prevDave: just guessing, really2007-10-22T17:41:23Z<p>just guessing, really</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 17:41, 22 October 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 10:</td>
<td colspan="2" class="diff-lineno">Line 10:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Dave|Dave]] 12:25, 22 October 2007 (EDT)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>--[[User:Dave|Dave]] 12:25, 22 October 2007 (EDT)</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== just guessing, really ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">since I don't know shit, but I added a } before the #ifdef DEBUG section and now I'm getting:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> [root@web ~]# gcc scpsftprsynconly.c -o /usr/local/bin/scpsftprsynconly</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> scpsftprsynconly.c:45: error: expected identifier or ‘(’ before ‘if’</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> scpsftprsynconly.c:49: error: expected identifier or ‘(’ before ‘if’</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> [root@web ~]# </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">which is in the first lines of </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">        if (argc < 3) {</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">                printf (restrictmsg);</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">                return 1;</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">        }</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">        if ((strncmp (argv [2], "scp ", 4) != 0)</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">wha?</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">--[[User:Dave|Dave]] 13:41, 22 October 2007 (EDT)</ins></div></td></tr>
<!-- diff cache key bsdwiki:diff:version:1.11a:oldid:9187:newid:9188 -->
</table>Davehttp://www.freebsdwiki.net/index.php?title=Talk:SSH,_limiting_to_SCP_or_Rsync_only&diff=9187&oldid=prevDave at 16:25, 22 October 20072007-10-22T16:25:19Z<p></p>
<p><b>New page</b></p><div>==just btw==<br />
# gcc scpsftprsynconly.c -o /usr/local/bin/scpsftprsynconly<br />
scpsftprsynconly.c: In function ‘main’:<br />
scpsftprsynconly.c:48: error: expected ‘)’ at end of input<br />
scpsftprsynconly.c:48: error: expected declaration or statement at end of input<br />
# <br />
<br />
<br />
tried running this on a centos box and this is what I'm getting. dubl-U Tee Eff Mmm8.<br />
<br />
--[[User:Dave|Dave]] 12:25, 22 October 2007 (EDT)</div>Dave