Skip to content

Commit

Permalink
SSH ForceCommand is now optional
Browse files Browse the repository at this point in the history
When sftp_force_command is false, we can force a per user specific
command by putting the "command" option in the .ssh/authorized_keys for
the user in question.

Example:
/home/user/.ssh/authorized_keys
command="rsync --server -av --delete . /my/dir", ssh-rsa AAAA....
  • Loading branch information
rastandy committed Sep 12, 2016
1 parent 4dbadbe commit 490cf93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/sshd_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Match Group {{ sftp_group_name }}
AllowTCPForwarding no
AllowAgentForwarding no
X11Forwarding no
{%if sftp_force_command %}
ForceCommand {{ sftp_force_command }}
{% endif %}
PubkeyAuthentication yes
PasswordAuthentication {% if sftp_allow_passwords %}yes{% else %}no{% endif %}

Expand Down

0 comments on commit 490cf93

Please sign in to comment.