From 13fde121b84c731037d726bf6db6ff2ed2feb215 Mon Sep 17 00:00:00 2001 From: Loic Correvon Date: Mon, 24 Oct 2022 09:50:26 +0200 Subject: [PATCH 1/2] update wget url to reflect the project migration --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a462bf..b3cb5fa 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ You can use this to set environment variables, define functions, and run post-lo #### Everything else - $ wget https://raw.githubusercontent.com/Russell91/sshrc/master/sshrc && + $ wget https://raw.githubusercontent.com/cdown/sshrc/master/sshrc && chmod +x sshrc && sudo mv sshrc /usr/local/bin #or anywhere else on your PATH From 869319aaf51e86e00446288fd2f34526d13edf5a Mon Sep 17 00:00:00 2001 From: Loic Correvon Date: Mon, 24 Oct 2022 11:47:37 +0200 Subject: [PATCH 2/2] create a install script --- install.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..efeb458 --- /dev/null +++ b/install.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -e + +# SSHRC +# https://github.com/cdown/sshrc/ +# sshrc works just like ssh, but it also sources the ~/.sshrc on your local computer after logging in remotely. + +# Install sshrc +wget https://raw.githubusercontent.com/cdown/sshrc/master/sshrc +chmod +x sshrc +sudo mv sshrc /usr/local/bin #or anywhere else on your PATH + +# Make a link to your local .bashrc file that sshrc will copy at connection at /tmp/..sshrc... +mkdir ~/.sshrc.d +ln -s ~/.bashrc ~/.sshrc.d + +echo -e "echo \"Your custom .bashrc file has been copied and sourced\" +source /tmp/..sshrc.*/.sshrc.d/.bashrc" > ~/.sshrc + +# Connection +# sshrc $USER host_ip \ No newline at end of file