From 8bf5792bd977e5cdcd4305b92e7d1e09f6db4312 Mon Sep 17 00:00:00 2001 From: Advaith Menon Date: Wed, 19 Nov 2025 12:33:00 -0500 Subject: [PATCH] Add SSH Proxy Setup Script * Add script that copies the SSH public key to the current directory for easy upload of those keys --- unix/proxy/setup-proxy.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 unix/proxy/setup-proxy.sh diff --git a/unix/proxy/setup-proxy.sh b/unix/proxy/setup-proxy.sh new file mode 100755 index 0000000..4a2b127 --- /dev/null +++ b/unix/proxy/setup-proxy.sh @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +if [ -z "$OUTPUT_FILE" ]; then + OUTPUT_FILE="./$(whoami)_ssh_pubkey.txt" +fi + +if [ -z $HOME ]; then + echo 'error: $HOME not set. Please run from a normal shell.' + return 1 +fi + +if [ ! -f "$HOME/.ssh/id_rsa.pub" ]; then + echo "Creating a ssh key." + echo "Leave the location at its default." + ssh-keygen -t rsa +fi + +if [ -f "$OUTPUT_FILE" ]; then + echo "Delete copied SSH key" + rm "$OUTPUT_FILE" +fi + +cp ~/.ssh/id_rsa.pub "$OUTPUT_FILE" + +echo "Send the following file to support@devinivas.in using your registered" +echo "DISH e-mail:" +echo " $OUTPUT_FILE" -- 2.47.3