commit 1ee35fcda5d88cd3c3fc9251ad324db8ea65f737 parent 3da03fd0430b521324193f50d34c734bc86bc05c Author: andersuno <anders.hedman01@gmail.com> Date: Thu, 6 Aug 2020 15:57:47 +0200 Changes to be committed: new file: sshconnect.sh Diffstat:
A | sshconnect.sh | | | 18 | ++++++++++++++++++ |
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/sshconnect.sh b/sshconnect.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Give dmenu list of hosts to connect to via ssh +# Change terminator to your preferred terminal emulator + +# Format for sshhosts.txt: +# <IP> <Optional, Searchable Description> +# 10.0.0.1 Webserver + +# Prepend entry with "#" to disable + +machine=$(grep -v "#" ~/.config/sshhosts.txt | dmenu -i -l 20 -fn Monospace-18 | cut -d' ' -f1) + +[ "$machine" != "" ] || exit + +user=$(echo "anders +root" | dmenu -p "Connect as: ") + +terminator -e "ssh $user@$machine"