Add server-side/step2_as_user_without_sudo.sh
This is the second server-side HydraVeil Node Operator script, to be run as the new Linux user (that is NOT root). Do NOT run it with sudo, I repeat do NOT run this with sudo, because it messes up which key is used. The script not only sets up the key, but also checks on IPv6.
This commit is contained in:
parent
1919e4a890
commit
6ad9522545
1 changed files with 39 additions and 0 deletions
39
server-side/step2_as_user_without_sudo.sh
Normal file
39
server-side/step2_as_user_without_sudo.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash -eu
|
||||||
|
|
||||||
|
# Run this as your Linux user and WITHOUT sudo
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# #
|
||||||
|
# Generate server-side SSH keys as the Linux user #
|
||||||
|
# #
|
||||||
|
############################################################################
|
||||||
|
URL="https://loopsofzen.uk"
|
||||||
|
VARIABLE_A="output.txt"
|
||||||
|
STRING_TO_TEST="<html><title>Loops of Zen</title>"
|
||||||
|
|
||||||
|
# Curl to get the page
|
||||||
|
curl -o "$VARIABLE_A" "$URL"
|
||||||
|
|
||||||
|
# Check if the first line contains the $THIS string
|
||||||
|
FIRST_LINE=$(head -n 1 "$VARIABLE_A")
|
||||||
|
if [ "$FIRST_LINE" = "$STRING_TO_TEST" ]; then
|
||||||
|
IPV6_TEST_RESULT="IPv6 Enabled"
|
||||||
|
else
|
||||||
|
IPV6_TEST_RESULT="IPv6 not detected. IPv4 Only"
|
||||||
|
fi
|
||||||
|
############################################################################
|
||||||
|
# #
|
||||||
|
# Generate server-side SSH keys as the Linux user #
|
||||||
|
# #
|
||||||
|
############################################################################
|
||||||
|
mkdir ~/.ssh/
|
||||||
|
echo "___________________"
|
||||||
|
echo "Generating server-side SSH key for pulling our repo. Hit enter for default name, and again empty for pass (no pass). Just keep hitting enter"
|
||||||
|
ssh-keygen -t ed25519
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "This is your server's public SSH key to give to Simplified Privacy."
|
||||||
|
echo
|
||||||
|
cat ~/.ssh/id_ed25519.pub
|
||||||
|
echo
|
||||||
|
echo "And tell them that your IPv6 test result is: $IPV6_TEST_RESULT"
|
||||||
Loading…
Reference in a new issue