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