<?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>Commenti a: SSH in CHROOT: la soluzione nativa</title>
	<atom:link href="http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/</link>
	<description>Perché niente è impossibile da capire... Se lo spieghi bene !</description>
	<lastBuildDate>Mon, 02 Jan 2012 11:31:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Di: Raoul Scarazzini</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-2100</link>
		<dc:creator>Raoul Scarazzini</dc:creator>
		<pubDate>Mon, 29 Aug 2011 10:12:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-2100</guid>
		<description>Certo, se l&#039;architettura del sistema è 64 bit quella directory diventa indispensabile.

A presto!

Raoul</description>
		<content:encoded><![CDATA[<p>Certo, se l&#8217;architettura del sistema è 64 bit quella directory diventa indispensabile.</p>
<p>A presto!</p>
<p>Raoul</p>
]]></content:encoded>
	</item>
	<item>
		<title>Di: Chalda</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-2096</link>
		<dc:creator>Chalda</dc:creator>
		<pubDate>Fri, 26 Aug 2011 10:56:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-2096</guid>
		<description>Grazie dell&#039;articolo,
Una precisazione: in Debian occorre copiare anche la cartella &lt;b&gt;/lib64&lt;/b&gt;, altrimenti da quest&#039;errore nella fase di login:

/bin/sh: No such file or directory 
Connection to x.x.x.x closed.</description>
		<content:encoded><![CDATA[<p>Grazie dell&#8217;articolo,<br />
Una precisazione: in Debian occorre copiare anche la cartella <b>/lib64</b>, altrimenti da quest&#8217;errore nella fase di login:</p>
<p>/bin/sh: No such file or directory<br />
Connection to x.x.x.x closed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Di: Raoul Scarazzini</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-2022</link>
		<dc:creator>Raoul Scarazzini</dc:creator>
		<pubDate>Thu, 12 May 2011 08:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-2022</guid>
		<description>Ciao Antonio e grazie per i complimenti. Per quanto riguarda il tuo problema, ricorda che la soluzione nativa del chroot di ssh prevede che la cartella &quot;base&quot;, ossia quella di destinazione, sia di proprietà dell&#039;utente root e del gruppo omonimo, con permessi di scrittura SOLO per l&#039;utente root.
Questo significa che è del tutto normale non poter scrivere direttamente sulla cartella con l&#039;utente non privilegiato. Per &quot;risolvere&quot; il problema non resta quindi che creare una sotto cartella con i privilegi del tuo utente in modo che lì possa scrivere.
In alternativa, la soluzione non nativa (descritta negli articoli SSH in CHROOT: Una gabbia per la shell sicura &lt;a href=&quot;http://www.miamammausalinux.org/2008/02/ssh-in-chroot-una-gabbia-per-la-shell-sicura-1-di-2/&quot; rel=&quot;nofollow&quot;&gt;1 di 2&lt;/a&gt; e &lt;a href=&quot;http://www.miamammausalinux.org/2008/02/ssh-in-chroot-una-gabbia-per-la-shell-sicura-2-di-2/&quot; rel=&quot;nofollow&quot;&gt;2 di 2&lt;/a&gt;) ti consente di ottenere invece esattamente quello che vuoi. E&#039; chiaro che utilizzare quanto gli sviluppatori di ssh danno per &quot;sicuro&quot; è sempre meglio.

A presto!</description>
		<content:encoded><![CDATA[<p>Ciao Antonio e grazie per i complimenti. Per quanto riguarda il tuo problema, ricorda che la soluzione nativa del chroot di ssh prevede che la cartella &#8220;base&#8221;, ossia quella di destinazione, sia di proprietà dell&#8217;utente root e del gruppo omonimo, con permessi di scrittura SOLO per l&#8217;utente root.<br />
Questo significa che è del tutto normale non poter scrivere direttamente sulla cartella con l&#8217;utente non privilegiato. Per &#8220;risolvere&#8221; il problema non resta quindi che creare una sotto cartella con i privilegi del tuo utente in modo che lì possa scrivere.<br />
In alternativa, la soluzione non nativa (descritta negli articoli SSH in CHROOT: Una gabbia per la shell sicura <a href="http://www.miamammausalinux.org/2008/02/ssh-in-chroot-una-gabbia-per-la-shell-sicura-1-di-2/" rel="nofollow">1 di 2</a> e <a href="http://www.miamammausalinux.org/2008/02/ssh-in-chroot-una-gabbia-per-la-shell-sicura-2-di-2/" rel="nofollow">2 di 2</a>) ti consente di ottenere invece esattamente quello che vuoi. E&#8217; chiaro che utilizzare quanto gli sviluppatori di ssh danno per &#8220;sicuro&#8221; è sempre meglio.</p>
<p>A presto!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Di: antonio</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-2021</link>
		<dc:creator>antonio</dc:creator>
		<pubDate>Wed, 11 May 2011 15:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-2021</guid>
		<description>Ciao, complimenti per l&#039;articolo che mi ha aiutato tantissimo a creare la gabbia e a limitare il navigazione degli utenti in giro per il filesystem.
Ora però non riesco a far funzioanre i servizi scp ed sftp. O meglio: ogni volta che provo a copiare un file con scp o con sftp mi viene restituito il messaggio di errore &quot;Permission denied&quot;... hai dei suggerimenti? 
Ho fatto tantissime prove ma non riesco a capire dove sta il problema.
Grazie
Ciao</description>
		<content:encoded><![CDATA[<p>Ciao, complimenti per l&#8217;articolo che mi ha aiutato tantissimo a creare la gabbia e a limitare il navigazione degli utenti in giro per il filesystem.<br />
Ora però non riesco a far funzioanre i servizi scp ed sftp. O meglio: ogni volta che provo a copiare un file con scp o con sftp mi viene restituito il messaggio di errore &#8220;Permission denied&#8221;&#8230; hai dei suggerimenti?<br />
Ho fatto tantissime prove ma non riesco a capire dove sta il problema.<br />
Grazie<br />
Ciao</p>
]]></content:encoded>
	</item>
	<item>
		<title>Di: Raoul Scarazzini</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-1985</link>
		<dc:creator>Raoul Scarazzini</dc:creator>
		<pubDate>Fri, 18 Feb 2011 11:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-1985</guid>
		<description>A questo punto sono decisamente curioso, visto che la configurazione sembra decisamente corretta. Lancia questi comandi e posta l&#039;output:

&lt;pre lang=&quot;console&quot;&gt;
# cat /etc/passwd &#124; grep test
# cat /etc/group &#124; grep test
&lt;/pre&gt;

Dopodiché prova ad effettuare un login e vedi se riesci a fare queste cose:

&lt;pre lang=&quot;console&quot;&gt;
# cd /
# ls -la
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>A questo punto sono decisamente curioso, visto che la configurazione sembra decisamente corretta. Lancia questi comandi e posta l&#8217;output:</p>

<div class="wp_syntax"><div class="code"><pre class="console" style="font-family:monospace;"># cat /etc/passwd | grep test
# cat /etc/group | grep test</pre></div></div>

<p>Dopodiché prova ad effettuare un login e vedi se riesci a fare queste cose:</p>

<div class="wp_syntax"><div class="code"><pre class="console" style="font-family:monospace;"># cd /
# ls -la</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>Di: giuseppe</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-1984</link>
		<dc:creator>giuseppe</dc:creator>
		<pubDate>Fri, 18 Feb 2011 10:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-1984</guid>
		<description>un po lungo ma è tutto sshd_config

&lt;pre lang=&quot;console&quot;&gt;
#	$OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
LogLevel DEBUG

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile	.ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don&#039;t trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don&#039;t read the user&#039;s ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes

# Set this to &#039;yes&#039; to enable PAM authentication, account processing, 
# and session processing. If this is enabled, PAM authentication will 
# be allowed through the ChallengeResponseAuthentication mechanism. 
# Depending on your PAM configuration, this may bypass the setting of 
# PasswordAuthentication, PermitEmptyPasswords, and 
# &quot;PermitRootLogin without-password&quot;. If you just want the PAM account and 
# session checks to run without PAM authentication, then enable this but set 
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES 
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT 
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner /some/path

# override default of no subsystems
#Subsystem	sftp	/usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp

Match Group test
        ChrootDirectory /chroot/
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>un po lungo ma è tutto sshd_config</p>

<div class="wp_syntax"><div class="code"><pre class="console" style="font-family:monospace;">#	$OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $
&nbsp;
# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.
&nbsp;
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
&nbsp;
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.
&nbsp;
#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
&nbsp;
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
&nbsp;
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768
&nbsp;
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
LogLevel DEBUG
&nbsp;
# Authentication:
&nbsp;
#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
&nbsp;
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile	.ssh/authorized_keys
&nbsp;
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
&nbsp;
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes
&nbsp;
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
&nbsp;
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
&nbsp;
# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
&nbsp;
# Set this to 'yes' to enable PAM authentication, account processing, 
# and session processing. If this is enabled, PAM authentication will 
# be allowed through the ChallengeResponseAuthentication mechanism. 
# Depending on your PAM configuration, this may bypass the setting of 
# PasswordAuthentication, PermitEmptyPasswords, and 
# &quot;PermitRootLogin without-password&quot;. If you just want the PAM account and 
# session checks to run without PAM authentication, then enable this but set 
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes
&nbsp;
# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES 
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT 
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none
&nbsp;
# no default banner path
#Banner /some/path
&nbsp;
# override default of no subsystems
#Subsystem	sftp	/usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
&nbsp;
Match Group test
        ChrootDirectory /chroot/</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>Di: Raoul Scarazzini</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-1982</link>
		<dc:creator>Raoul Scarazzini</dc:creator>
		<pubDate>Thu, 17 Feb 2011 17:23:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-1982</guid>
		<description>Posta anche il tuo file sshd_config... Dai log sembra proprio non agganci il chroot...</description>
		<content:encoded><![CDATA[<p>Posta anche il tuo file sshd_config&#8230; Dai log sembra proprio non agganci il chroot&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Di: giuseppe</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-1981</link>
		<dc:creator>giuseppe</dc:creator>
		<pubDate>Thu, 17 Feb 2011 17:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-1981</guid>
		<description>si scusa vedo il login dell&#039;utente, ma in messagge e non in secure
la versione di ssh usata è 5.1 qualcosa


questo è il log del message dopo il livello debug

&lt;pre lang=&quot;console&quot;&gt;
Feb 17 18:13:00 localhost sshd[5079]: Set /proc/self/oom_adj to 0
Feb 17 18:13:00 localhost sshd[5079]: Connection from 172.20.1.8 port 54239
Feb 17 18:13:03 localhost sshd[5079]: Accepted password for test from 172.20.1.8 port 54239 ssh2
Feb 17 18:13:03 localhost sshd[5079]: User child is on pid 5081
Feb 17 18:13:05 localhost sshd[5081]: Received disconnect from 172.20.1.8: 11: disconnected by user
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>si scusa vedo il login dell&#8217;utente, ma in messagge e non in secure<br />
la versione di ssh usata è 5.1 qualcosa</p>
<p>questo è il log del message dopo il livello debug</p>

<div class="wp_syntax"><div class="code"><pre class="console" style="font-family:monospace;">Feb 17 18:13:00 localhost sshd[5079]: Set /proc/self/oom_adj to 0
Feb 17 18:13:00 localhost sshd[5079]: Connection from 172.20.1.8 port 54239
Feb 17 18:13:03 localhost sshd[5079]: Accepted password for test from 172.20.1.8 port 54239 ssh2
Feb 17 18:13:03 localhost sshd[5079]: User child is on pid 5081
Feb 17 18:13:05 localhost sshd[5081]: Received disconnect from 172.20.1.8: 11: disconnected by user</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>Di: Raoul Scarazzini</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-1977</link>
		<dc:creator>Raoul Scarazzini</dc:creator>
		<pubDate>Thu, 17 Feb 2011 13:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-1977</guid>
		<description>Molto, molto strano. In /var/log/secure non puoi non avere nulla: quantomeno devi avere le prove che l&#039;utente si è collegato con successo.
Aumentando poi il livello di debug (opzione &lt;em&gt;LogLevel DEBUG&lt;/em&gt; in &lt;em&gt;/etc/ssh/sshd_config&lt;/em&gt;) di ssh potresti anche riuscire a capir qualcosa in più.
Esiste anche un modo per effettuare debug lato client, lanciando ssh con l&#039;opzione -v.
Inoltre controlla la versione di ssh: deve essere obbligatoriamente la 5.</description>
		<content:encoded><![CDATA[<p>Molto, molto strano. In /var/log/secure non puoi non avere nulla: quantomeno devi avere le prove che l&#8217;utente si è collegato con successo.<br />
Aumentando poi il livello di debug (opzione <em>LogLevel DEBUG</em> in <em>/etc/ssh/sshd_config</em>) di ssh potresti anche riuscire a capir qualcosa in più.<br />
Esiste anche un modo per effettuare debug lato client, lanciando ssh con l&#8217;opzione -v.<br />
Inoltre controlla la versione di ssh: deve essere obbligatoriamente la 5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Di: giuseppe</title>
		<link>http://www.miamammausalinux.org/2009/06/ssh-in-chroot-la-soluzione-nativa/comment-page-1/#comment-1976</link>
		<dc:creator>giuseppe</dc:creator>
		<pubDate>Thu, 17 Feb 2011 11:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.miamammausalinux.org/?p=707#comment-1976</guid>
		<description>il gruppo è test e nel /var/log/secure non ho nulla.
ho provato a installare un VM con centos 5.5 ma ho i medesimi problemi</description>
		<content:encoded><![CDATA[<p>il gruppo è test e nel /var/log/secure non ho nulla.<br />
ho provato a installare un VM con centos 5.5 ma ho i medesimi problemi</p>
]]></content:encoded>
	</item>
</channel>
</rss>

