Skip to content

Commit

Permalink
f-dd
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Oct 13, 2023
1 parent ded39f9 commit e4c2954
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion stack/base/before-notebook.d/10_prepare-home-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ if [[ -f /opt/bin/load-singlesshagent.sh ]] && ! grep -q "${header}" /home/${NB_
${header}
if [ -f /opt/bin/load-singlesshagent.sh ]; then
source /opt/bin/load-singlesshagent.sh
ssh-add /home/${NB_USER}/.ssh/id_rsa 2> /dev/null
fi
EOF
fi

# load the ssh-agent and add the default key generated above
source /opt/bin/load-singlesshagent.sh
4 changes: 2 additions & 2 deletions stack/base/load-singlesshagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ load_singlesshagent() {
elif [ "$SSHADD_RETVAL" == "1" ]
then
[ "$VERBOSE" == "true" ] && echo " - ssh-agent found (${SSH_AGENT_PID}), no keys (I might want to add keys here)" >&2
# Maybe the user wants to do it by himself?
#ssh-add
# run ssh-add to add the default generate key `id_rsa` to the agent
ssh-add ~/.ssh/id_rsa
elif [ "$SSHADD_RETVAL" == "0" ]
then
NUMKEYS=`echo "$SSH_ADD_OUTPUT" | wc -l`
Expand Down

0 comments on commit e4c2954

Please sign in to comment.