2022-02-09 13:11:08 +01:00
|
|
|
# installation : run 'podmen recipe sshkey' or put this file into .podman folder
|
|
|
|
|
# example usage: ./podman init git@yourserver
|
|
|
|
|
|
2022-02-09 18:09:31 +01:00
|
|
|
init_sshkey(){
|
|
|
|
|
header sshkey
|
2022-02-09 22:58:31 +01:00
|
|
|
local key=~/.ssh/id_rsa_$appname
|
2022-02-09 13:11:08 +01:00
|
|
|
test -f $key && {
|
|
|
|
|
ssh-keygen -t rsa -N "" -f $key
|
2022-02-09 22:58:31 +01:00
|
|
|
ssh-key-copy -p $port -i $key $user@$server
|
2022-02-09 13:11:08 +01:00
|
|
|
}
|
2022-02-09 22:58:31 +01:00
|
|
|
print "Yay! share key '~/.ssh/id_rsa_$appname' to collaborate with devs "
|
2022-02-09 13:11:08 +01:00
|
|
|
}
|
2022-02-09 18:09:31 +01:00
|
|
|
|
|
|
|
|
on init_server init_sshkey
|