To successfully become a provider, root login need to have been enabled on your machine. Below is a guide on how to successfuly do that, if it has not yet been enabled.
Prerequisite Step: Configure your Server:
This assumes you are using Linux.
Edit Your SSHD Configuration
First of all, you should edit your sshd configuration /etc/ssh/sshd_config to update specific perimeters for enhanced security.
- Switch to the root user to ensure you have you have the necessary permissions:
sudo -i
- Open the configuration file with a text editor:
sudo nano /etc/ssh/sshd_config
- Locate the following lines in the file. If they are commented out (prefixed with
#), remove the#to uncomment them:
PermitRootLogin prohibit-passwordPubkeyAuthentication yes- Update the
PasswordAuthenticationparameter. Uncomment it, and change its value tonoif it is currently set toyes:
PasswordAuthentication no-
Save and close the file:
- If using
nano, pressCTRL+Oto save andCTRL+Xto exit.
- If using
-
Edit the
~/.ssh/authorized_keysfile:
nano ~/.ssh/authorized_keys
- Ensure the file contains the following lines:
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user "admin" rather than the user "root".';echo;sleep 10;exit 142" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCTBuQzRQor39mU++RthyjUheuWj1Ph+lyyQwwp5t5AgfvXjM2SuQNFyEedIAkOd8/fuv/ejKrtP85TurF1fdAiixj/N5N+nW+GgJO9s/W6......- Comment the first line, and then find
ssh-rsa, and hit theenter(orreturn) key to take it to a new line. It should now look like this:
#no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user "admin" rather than the user "root".';echo;sleep 10;exit 142" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCTBuQzRQor39mU++RthyjUheuWj1Ph+lyyQwwp5t5AgfvXjM2SuQNFyEedIAkOd8/fuv/ejKrtP85TurF1fdAiixj/N5N+nW+GgJO9s/W6......- Restart the SSH service to apply the changes:
sudo systemctl restart sshNB: If you get an error message, try sudo systemctl restart sshd.
- To ensure the changes have been applied, check the current SSHD configuration:
sudo sshd -T | grep -E 'permitrootlogin|pubkeyauthentication|passwordauthentication'If you did everything correctly, the output should display:
permitrootlogin prohibit-password pubkeyauthentication yes passwordauthentication no- Finally, make sure you open the following ports:
2379-2380, 6443, 30000,32676, 22, 8443, 8444, 80, 443.
You are now ready to create a provider.