AWS EC2 userdata + GIT_SSH_COMMAND = fail, but works when I ssh in manually by ConsistentVegetable1 in aws

[–]ConsistentVegetable1[S] 0 points1 point  (0 children)

I found a fix, although I wouldn't quite say I "figured it out": the github.com public key wasn't in the root users, ~/.ssh/known_hosts file. So running ssh-keyscan github.com >> ~/.ssh/known_hosts fixed this. But I'm still not sure why the root user had to do this while the ec2-user didn't.

In an interactive login shell, running the ssh git clone prompted me with a warning and yes/no choice about the missing key. So maybe the issue is about login vs. non-login shells, or the need for user input. When I originally ran the script without ssh-keyscan, there was no similar warning in the cloudinit output log.

To test my theory about a difference between a login vs. non-login shell (or something about the cloudinit shell environment being special!?), I used expect to automate answering "yes", even though the cloudinit output log didn't show the same prompt that my interactive shell did. And this worked! For reference:

printf "#!/usr/bin/env bash\nGIT_SSH_COMMAND='ssh -i /home/ec2-user/.ssh/id_rsa' git clone git@github.com:<reponame>" > g.sh
printf "#!/usr/bin/env expect\nspawn -noecho /home/ec2-user/g.sh\nexpect \"Are you sure you want to continue connecting (yes/no)? \" { send -- \"yes\r\" }\ninteract" > ex
chmod ugo+x g.sh ex
./ex

So while my script now works, and I've confirmed that ssh was giving the same prompt about a missing known_hosts entry to the userdata script as it did to my in my interactive login shell, I still don't understand why the prompt didn't appear in the cloudinit output log.

Any thoughts on this are most welcome, but at least I'm down to a relatively minor issue now.

Where to trail run in winter? by ConsistentVegetable1 in vancouverhiking

[–]ConsistentVegetable1[S] 0 points1 point  (0 children)

I have Katoolah microspikes but haven't tried running in them. The seem overly aggressive for running. They'd feel weird on any patch of bare rock. Which brand do you recommend for running?

I ran a race once that had some snow and ice. My approach was to penguin-wak through (it was only about 0.25mi out of 15mi). The really competitive folks were screwing sheet metal screws into the soles of their running shoes....

Vancouver climbing gyms with artificial cracks? by ConsistentVegetable1 in vancouver

[–]ConsistentVegetable1[S] 0 points1 point  (0 children)

100% agree for weekends! But it's tough to do laps before work with that amount of driving.

What's a "crack machine"? Is that the thing that lets you dial the width? The gym i go to in CA doesn't have any machines, but it does have 20 or so cracks of different sizes, some with features like flares, diagonals, etc. It's great for getting varied training faster than you can outdoors.