<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Consentire_solo_l%27uso_di_SFTP</id>
	<title>Consentire solo l&#039;uso di SFTP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Consentire_solo_l%27uso_di_SFTP"/>
	<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Consentire_solo_l%27uso_di_SFTP&amp;action=history"/>
	<updated>2026-05-06T15:59:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Consentire_solo_l%27uso_di_SFTP&amp;diff=6016&amp;oldid=prev</id>
		<title>Gabriele.vivinetto: New page: {Stub}    Step 1: If it doesn&#039;t exist yet, create a group for the users you want to have sftp access only:  mark@neuskeutel:~$ sudo groupadd sftponly  Step 2: Add user &quot;mark&quot; to this group...</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Consentire_solo_l%27uso_di_SFTP&amp;diff=6016&amp;oldid=prev"/>
		<updated>2009-01-09T13:37:03Z</updated>

		<summary type="html">&lt;p&gt;New page: {Stub}    Step 1: If it doesn&amp;#039;t exist yet, create a group for the users you want to have sftp access only:  mark@neuskeutel:~$ sudo groupadd sftponly  Step 2: Add user &amp;quot;mark&amp;quot; to this group...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{Stub}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Step 1: If it doesn&amp;#039;t exist yet, create a group for the users you want to have sftp access only:&lt;br /&gt;
 mark@neuskeutel:~$ sudo groupadd sftponly&lt;br /&gt;
&lt;br /&gt;
Step 2: Add user &amp;quot;mark&amp;quot; to this group:&lt;br /&gt;
 mark@neuskeutel:~$ sudo adduser peter sftponly&lt;br /&gt;
&lt;br /&gt;
Step 3: Install openssh-server if it&amp;#039;s not installed yet.&lt;br /&gt;
 mark@neuskeutel:~$ sudo apt-get install openssh-server&lt;br /&gt;
&lt;br /&gt;
Step 4: Open the default OpenSSH server configuration for editing:&lt;br /&gt;
 mark@neuskeutel:~$ sudo nano /etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
Step 5: Change the default sftp server from:&lt;br /&gt;
 Subsystem sftp /usr/lib/openssh/sftp-server&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
 Subsystem sftp internal-sftp&lt;br /&gt;
&lt;br /&gt;
Step 6: Some users can only use sftp, but not other OpenSSH features like remote login. Let&amp;#039;s create a rule for that group of users (we&amp;#039;ll create the group afterwards). Add the following section to the bottom of /etc/ssh/sshd_config:&lt;br /&gt;
 Match group sftponly&lt;br /&gt;
 ChrootDirectory /home/%u&lt;br /&gt;
 X11Forwarding no&lt;br /&gt;
 AllowTcpForwarding no&lt;br /&gt;
 ForceCommand internal-sftp&lt;br /&gt;
&lt;br /&gt;
Step 7: Pass ownership of peter&amp;#039;s directory you want to be sftp accessible to the superuser:&lt;br /&gt;
 mark@neuskeutel:~$ sudo chown root.root /home/peter&lt;br /&gt;
&lt;br /&gt;
Step 8: Now we change peter&amp;#039;s home directory (normally /home/peter) to /:&lt;br /&gt;
 sudo usermod -d / peter&lt;br /&gt;
&lt;br /&gt;
Step 9: Repeat steps 2, 7 and 8 for any other users that you want to give sftp access.&lt;br /&gt;
&lt;br /&gt;
==Riferimenti==&lt;br /&gt;
*[http://blog.markvdb.be/2009/01/sftp-on-ubuntu-and-debian-in-9-easy.html Mark Van den Borre: SFTP on Ubuntu and Debian in 9 easy steps]&lt;/div&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
</feed>