[Arch] fix network, delete bar_scripts
[dotfiles_afify.git] / .scripts / ssh_generate.sh
blobebceab1c13e6051fcb9439757dca9f67ba746f54
1 #!/usr/bin/env bash
3 #===============================================================================
4 # Name : ssh_generate
5 # GitHub : Afify
6 # Copyright : MIT
7 # Version : 0.1
8 # Description :
9 #===============================================================================
11 email="hassanafify@protonmail.com"
12 server=$1
14 cd ~/.ssh/
16 ssh-keygen -t rsa -b 4096 -C $email -f $server
17 xclip -sel clip < ~/.ssh/$server.pub
19 echo "
20 # $server.com
21 Host $server.com
22 Preferredauthentications publickey
23 IdentityFile ~/.ssh/$server" >> ~/.ssh/config
25 # eval "$(ssh-agent -s)"
26 # ssh-add ~/.ssh/$git_site
27 # ssh-add -D # remove
29 # change ssh key passphrase
30 # ssh-keygen -p -f keyfile