curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/[email protected] | \
sudo tee /etc/systemd/system/[email protected]
sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
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
#!/bin/bash | |
## wget -O tox.sh waa.ai/iqt && chmod +x ./tox.sh && ./tox.sh | |
## ./tox.sh -sl to skip libsodium (they don't update that often) | |
## ./tox.sh -sd to skip libsodium and all the other dependencies | |
## If libraries are missing, remove /etc/ld.so.conf.d/locallib.conf and | |
## try running again. Else, try messing around with the prefix paths. | |
# Check if script is being ran as root | |
test "$(whoami)" == 'root' && (echo "Please don't run this script as root"; exit 1) |
Create a template service file at /etc/systemd/system/[email protected]
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
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
# Configuration file for tmtestnet: https://github.com/interchainio/testnets | |
# A geographically dispersed 8-validator test network. | |
id: testnet_08validators | |
templates: | |
base_validator: &base_validator | |
binary: v0.32.1 | |
config_template: ./validator-config.toml | |
validators: yes | |
in_genesis: yes |
Steps to change the URL of Rancher installation and switch from a self-signed certificate to a certificate signed by recognized CA.
- Change the Rancher
server-url
setting to the new URL:- Navigate to
https://<old_rancher_hostname>/g/settings/advanced
- Edit
server-url
tohttps://<new_rancher_hostname>
- Navigate to
- Clear the private CA certificate for the old certificate
- Navigate to
https://<old_rancher_hostname>/g/settings/advanced
- Next to
cacerts
click context menu -> View in API - Click Edit
- Clear the content of the
value
field
- Navigate to
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
curl -k -X GET \ | |
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ | |
https://$KUBERNETES_PORT_443_TCP_ADDR:$KUBERNETES_SERVICE_PORT_HTTPS |