This assumes a couple of things.
- You want more keys in the future.
- You are on linux.
Step 1: Generate the key.
ssh-keygen -f ~/.ssh/<Name of key, can be anything> -N ''
Step 2: Add following to ~/.ssh/config
#!/bin/bash | |
# Append this command to /etc/pam.d/sshd: | |
# session optional pam_exec.so <path to script> | |
# Remember to chown +x! | |
exec &> /dev/null #Hide output | |
Gotify_URL='https://gotify.example.com' | |
Gotify_Token='awawawawawawawawawawawawa' |
This assumes a couple of things.
Step 1: Generate the key.
ssh-keygen -f ~/.ssh/<Name of key, can be anything> -N ''
Step 2: Add following to ~/.ssh/config