From c25c0354ea27568a04315b820d0ccd26bdea0264 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 11 Nov 2020 13:37:26 -0700 Subject: [PATCH] print to stderr (debug) except public key --- ssh-utils/ssh-pubkey.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ssh-utils/ssh-pubkey.sh b/ssh-utils/ssh-pubkey.sh index 588dcca..ed5c345 100644 --- a/ssh-utils/ssh-pubkey.sh +++ b/ssh-utils/ssh-pubkey.sh @@ -22,20 +22,20 @@ if [ ! -f "$HOME/.ssh/id_rsa" ]; then ssh-keygen -b 2048 -t rsa -f "$HOME/.ssh/id_rsa" -q -N "" - echo "" + >&2 echo "" fi if [ ! -f "$HOME/.ssh/id_rsa.pub" ]; then ssh-keygen -y -f "$HOME/.ssh/id_rsa" > "$HOME/.ssh/id_rsa.pub" - echo "" + >&2 echo "" fi # TODO use the comment (if any) for the name of the file - echo "" - echo "~/Downloads/id_rsa.$(whoami).pub": - echo "" - rm -f "$HOME/Downloads/id_rsa.$(whoami).pub": + >&2 echo "" + >&2 echo "~/Downloads/id_rsa.$(whoami).pub": + >&2 echo "" + rm -f "$HOME/Downloads/id_rsa.$(whoami).pub" cp -r "$HOME/.ssh/id_rsa.pub" "$HOME/Downloads/id_rsa.$(whoami).pub" cat "$HOME/Downloads/id_rsa.$(whoami).pub" - echo "" + >&2 echo "" } -- 2.25.1