File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 44export KEY_NAME=" id_ed25519"
55
66if [ -d /Applications ]; then
7- pbcopy < ~ /.ssh/id_rsa .pub # copies key to clipboard
7+ pbcopy < ~ /.ssh/$KEY_NAME .pub # copies key to clipboard
88elif [ -d /c ]; then
9- cat ~ /.ssh/id_rsa .pub | clip # copies key to clipboard
9+ cat ~ /.ssh/$KEY_NAME .pub | clip # copies key to clipboard
1010else
1111 xclip -sel clip < ~ /.ssh/$KEY_NAME .pub
1212fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # copy ssh key
3+
4+ export KEY_NAME=" id_rsa"
5+
6+ if [ -d /Applications ]; then
7+ pbcopy < ~ /.ssh/$KEY_NAME .pub # copies key to clipboard
8+ elif [ -d /c ]; then
9+ cat ~ /.ssh/$KEY_NAME .pub | clip # copies key to clipboard
10+ else
11+ xclip -sel clip < ~ /.ssh/$KEY_NAME .pub
12+ fi
You can’t perform that action at this time.
0 commit comments