Child pages
  • SFTP

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

 

Introduction

SFTP (SSH File Transfer Protocol) allows the access of data over the network. It is not based on FTP but rather is an extension of the SSH protocol. Again, it is different from FTP over SSH.

Install

Debian 6.0 / 7.0 - Ubuntu 12.04 - Raspbian Wheezy

...

Configure ssh

Edit /etc/ssh/sshd.conf _config and modify:

Code Block
Subsystem sftp /usr/lib/openssh/sftp-server

...

Add at the end of the file and replace /var/www <sftpfolder> by the folder you are going to use for sftp (which can be /var/www):

Code Block
# SFTP configuration
 Match group <sftpgroup>
ChrootDirectory /var/www<sftpfolder>
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

 For the users to chroot into their home directory replace <sftpfolder> by %h

Create the folder structure

The root sftp folder needs to be set as owner root and permissions 755.

The folders and files under the ChrootDirectory need to be set has part of the group sftp.

Here are the right folder permissions for the following situation:

  • No access: 733700
  • Read only access: 755750
  • Read and Write access: 775770

Access

From Nautius

Type Ctrl + L once in Nautilus

In the address bar enter the sftp address as follow:

Code Block
sftp://user@ip/folder