8 if [ ! -f "$HOME/.ssh/id_rsa" ]; then
9 ssh-keygen -b 2048 -t rsa -f "$HOME/.ssh/id_rsa" -q -N ""
13 if [ ! -f "$HOME/.ssh/id_rsa.pub" ]; then
14 ssh-keygen -y -f "$HOME/.ssh/id_rsa" > "$HOME/.ssh/id_rsa.pub"
18 # TODO use the comment (if any) for the name of the file
20 echo "~/Downloads/id_rsa.$(whoami).pub":
22 rm -f "$HOME/Downloads/id_rsa.$(whoami).pub":
23 cp -r "$HOME/.ssh/id_rsa.pub" "$HOME/Downloads/id_rsa.$(whoami).pub"
24 cat "$HOME/Downloads/id_rsa.$(whoami).pub"