Forge Home

sftpd

manage sFTP servers

7,495 downloads

5,355 latest version

2.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.3.0 (latest)
  • 0.2.0
  • 0.1.2 (deleted)
  • 0.1.1
  • 0.1.0
released Aug 8th 2017
This version is compatible with:
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'kiran-sftpd', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add kiran-sftpd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install kiran-sftpd --version 0.3.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

kiran/sftpd — version 0.3.0 Aug 8th 2017

#kiran-sftpd

Module is going to install openssh and openssh-client application and configure itself for sftpd server

#Installing SSH server and start the service for you.

usage:

  class { 'sftpd': }

Options for copy the configuration file of "SSH" service.

  1. By default its using template for ssh configuration "${path}/templates/sshd_config.erb" .
  2. "${path}/files/sshd_config" file copy to remote host "${path}/files/sshd_config" .

If you want to use "${path}/files/sshd_config" file instead of template , change as follows #change "copy_config" into "yes" and "template_config" into "no". Use:

    sftpd::config { 'sshd_config':
        copy_config             => yes,
        template_config         => no,
    }

#If the selinux disabled on agent . #If it "yes", It may take little bit time to set the boolean paramater for selinux.

sftpd::config { 'sshd_config':
            selenable   =>  no,
    }

#Usage in manifest file to create Groups and Users . #To create Groups .

 sftpd::groups { 'sftpgroup1':
  groupname    => sftpgroup,
  ensure          => present,
 }

#To create Users .

 sftpd::users { 'sftpuser1':
      user            => test,
      ensure          => present,
      usergroups      => ['sftpgroup'],
      password        => '$1$ju6myyQV$P.UOTsdfadskflfdsafasdkdsfja/',   #pass the hash
      managehome      => true,
      upload_dir      => market,                                #share directory EX: upload
 }

NOTE: To generate the password hash you can use the following command on your linux platforms #openssl passwd -1 ; prompt for password


#It's support hiera also , so you can pass values thorugh hiera. #using hiera for user,share directory and groups creation.

#To create a group.

 sftpd::groups:
   'sftpgroup1':
      groupname: sftpgroup
      ensure: present

#To create user and upload directory .

 sftpd::users:
  'sftpuser1':
     ensure: present
     user: test1
     usergroups:
       - sftpgroup
     password: '$1$ju6myyQV$P.UOTwLX0adfadsfasUK5Jan/'
     managehome: true       
     upload_dir: market

#Deleting the Users and Group from hiera . #Delete The Group .

  sftpd::groups:
    'sftpgroup1':
       ensure: absent
       groupname: sftpgroup

#Delete The User .

  sftpd::users:
    'sftpuser1':
    ensure: absent