Skip to content

Instantly share code, notes, and snippets.

@fabiotatsuo
Last active August 29, 2015 14:26
Show Gist options
  • Save fabiotatsuo/ce0ae1ecb3cdccd09654 to your computer and use it in GitHub Desktop.
Save fabiotatsuo/ce0ae1ecb3cdccd09654 to your computer and use it in GitHub Desktop.
Create sftp password access to server Ubuntu 15.04 EC2
List all groups
cut -d: -f1 /etc/group
sudo groupadd sftp
Group Password Authentication
sudo vim /etc/ssh/sshd_config
Match Group sftp
PasswordAuthentication yes
# Further directives for users in the "sftp" group
sudo service ssh restart
Add an user to an existing group
sudo useradd -G sftp yourusername
sudo passwd yourusername
passwd yourpasswd
List group users
getent group groupname
Delete user
sudo userdel username
Delete group
sudo groupdel groupname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment