We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7fce33 commit 76612a6Copy full SHA for 76612a6
push.sh
@@ -52,10 +52,13 @@ fi
52
if [ ! -r ssh_host_rsa_key ]; then
53
if [ ! -r ~/.ssh/chisel_host_key ]; then
54
ssh-keygen -t rsa -f ~/chisel_host_rsa_key -N '' -C "chisel-ssh identity for $CHISEL_APP_NAME"
55
- echo '[localhost]:$CHISEL_LOCAL_PORT' `cat ~/chisel_host_rsa_key.pub` >> ~/.ssh/known_hosts
56
fi
57
58
cp ~/.ssh/chisel_host_key ssh_host_rsa_key
+
59
+ # We always check to see if the key is in known_hosts, because this is a per-port entry
60
+ hostsEntry="[127.0.0.1]:$CHISEL_LOCAL_PORT `cat ~/chisel_host_rsa_key.pub`"
61
+ grep -q "$hostsEntry" ~/.ssh/known_hosts || echo "$hostsEntry" >> ~/.ssh/known_hosts
62
63
64
if [ ! -r id_rsa.pub ]; then
0 commit comments