Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 697 Bytes

SFTP_Restricted_Accounts.rst

File metadata and controls

30 lines (21 loc) · 697 Bytes

HOWTO Enable SFTP Restricted Accounts

This section describes the method for restricting an account to SSH File Transfer Protocol (SFTP) access only.

Add a User

Create a user account based on the following example.

user { "foo":
  uid   => <UID>,
  gid   => <GID>,
  shell => '/usr/libexec/openssh/sftp-server'
}

Modify /etc/shells

To allow your user to use the sftp-server application as a shell, you will need to add custom shell to useradd::shells in Hiera as shown below.

useradd::shells:
  - /usr/libexec/openssh/sftp-server