Skip to content

Instantly share code, notes, and snippets.

@bradmontgomery
Created October 25, 2012 18:28
Show Gist options
  • Save bradmontgomery/3954511 to your computer and use it in GitHub Desktop.
Save bradmontgomery/3954511 to your computer and use it in GitHub Desktop.
Chef role that sets up sshd with an enabled SFTP subsystem. I use `upload_project` in fabric, and after moving to a Chef-based system I started getting `ssh.SSHException: Channel closed` errors.
name "sshserver"
description "Configures SSH and enables SFTP"
run_list(
"recipe[openssl::default]",
"recipe[openssh]",
)
default_attributes(
"openssh" => {
"server" => {
"subsystem" => "sftp /usr/lib/openssh/sftp-server" # path for Ubuntu; ymmv
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment