From 5de9064cf01028cb01d80fc7b67cfa799f064018 Mon Sep 17 00:00:00 2001 From: 12nick12 Date: Tue, 5 Jun 2018 17:00:11 -0400 Subject: [PATCH] Update setup.sh --- host/setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/setup.sh b/host/setup.sh index 6ed7dfc..9c1cc48 100644 --- a/host/setup.sh +++ b/host/setup.sh @@ -1,6 +1,8 @@ #!/bin/bash serverport=22333 +servername=test.test.com +username=root host=$(hostname) ip=$(curl -s https://canihazip.com/s) @@ -18,4 +20,4 @@ sqlite3 $dir/sshjump.db 'create table sshjump(host, ip, port, id);' sqlite3 $dir/sshjump.db "INSERT INTO sshjump(host, ip, port, id) VALUES(\"$host\", \"$ip\", \"$port\", \"$id\");" -echo "INSERT INTO sshjump(host, ip, port, id) VALUES(\"$host\", \"$ip\", \"$port\", \"$id\");" | ssh -p 22333 root@remotessh.nicks.tv "sqlite3 /opt/sshjump/sshjump.db" +echo "INSERT INTO sshjump(host, ip, port, id) VALUES(\"$host\", \"$ip\", \"$port\", \"$id\");" | ssh -p 22333 $username@$servername "sqlite3 $dir/sshjump.db"