3 email
="hassan@afify.dev"
10 public
) ktype
='public' ;;
11 private
) ktype
='private' not
='!' ;;
13 selected_key
=$
(find $ssh_dir -type f
$not -iname "*.pub" !\
14 -name "config" ! -name "known_hosts" |\
15 dmenu
-l 10 -p "Select $ktype ssh key: ")
19 tr -d '\n' | xclip
-sel clip
23 gen
) time ssh-keygen
-t ed25519
-a 100 -C $email -f $ssh_dir/$server
24 clipb
$ssh_dir/$server.pub
25 printf "\n# $server.com\nHost $server.com
26 IdentityFile $ssh_dir/$server" |
tr -d '\t' >> $ssh_dir/config
;;
27 rsa_gen
) ssh-keygen
-t rsa
-b 4096 -C $email -f $ssh_dir/$server ;;
28 public
) select_key public
; cat $selected_key | clipb
;;
29 private
) select_key private
; cat $selected_key | clipb
;;
30 pass
) select_key private
; ssh-keygen
-p -f $selected_key ;;
31 finger) select_key public
; ssh-keygen
-l -E md5
-f $selected_key | clipb
;;
32 send
) select_key public
; ssh-copy-id
-i $selected_key -f $server ;;