Skip to content

Commit

Permalink
refactor: SSH key id to be more unique
Browse files Browse the repository at this point in the history
  • Loading branch information
engineervix committed Jul 30, 2024
1 parent 6c5d088 commit 7964af0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/core/social/make_video.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ done
if [ "$instance_status" == "running" ]; then
echo "Instance is now running!"
# We need to generate an SSH key and add it to the machine
ssh-keygen -t rsa -b 4096 -f "$KEY_NAME" -N "$PASSPHRASE" -C "vast-box-$(date --iso)@$(hostname)"
## but first, delete any that may exist
rm -fv vast_*
ssh-keygen -t rsa -b 4096 -f "$KEY_NAME" -N "$PASSPHRASE" -C "vast-box-$(date +'%Y%m%d_%H%M%S')@$(hostname)"

vastai attach ssh "$instance_id" "$(cat "$KEY_NAME.pub")"
# delete last entry in known_hosts
Expand Down

0 comments on commit 7964af0

Please sign in to comment.