From 4beb920c51bc131d91c98e80e18fc793f5820c20 Mon Sep 17 00:00:00 2001 From: 12nick12 Date: Tue, 5 Jun 2018 16:58:07 -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 af8a54e..6ed7dfc 100644 --- a/host/setup.sh +++ b/host/setup.sh @@ -1,5 +1,7 @@ #!/bin/bash +serverport=22333 + host=$(hostname) ip=$(curl -s https://canihazip.com/s) port=$(shuf -i 9151-49151 -n 1) @@ -10,7 +12,7 @@ ssh-keygen -t rsa -f $dir/id_rsa -q -N "" chmod 400 $dir/id_rsa* -cat $dir/id_rsa.pub | ssh -p port root@remotehost.com "mkdir -p ~/.ssh; chmod 700 ~/.ssh; cat >> ~/.ssh/authorized_keys" +cat $dir/id_rsa.pub | ssh -p $serverport root@remotehost.com "mkdir -p ~/.ssh; chmod 700 ~/.ssh; cat >> ~/.ssh/authorized_keys" sqlite3 $dir/sshjump.db 'create table sshjump(host, ip, port, id);'