Last active
May 27, 2020 20:16
-
-
Save sarahbanas/a65bf40e48e5f42b7f4f5f43e5783d61 to your computer and use it in GitHub Desktop.
Create a prosody user via shell script remotely
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure to have your prosody set up on your server, such as remote_prosody@yourserver, and can access root/sudo | |
# you can create this file and c&p the 5 lines below into the home directory | |
$ cd ~ | |
$ vi create_prosody_user.sh | |
#!/bin/bash | |
sudo -s <<EOF | |
prosodyctl register $1 yourhost.com "$2" | |
EOF | |
# in command line | |
$ sudo chmod +x create_prosody_user.sh | |
$ ./create_prosody_user.sh myuser thepassword | |
# to do it via remotely | |
$ sshpass -p YourPassword ssh remote_prosody@yourhost ./create_prosody_user.sh newuser theirpass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment