saves to ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub by default if no -f flag
used -C to add a comment blob at the end of the key to make it look legit
will create 2 files, the secret key id_rsa and a public key id_rsa.pub. will login with the secret key and append the contents of the pubkey to the authorized_keys file on the victim
transfer the pubkey and append content to authorized_keys in victim:
add to a low privileged user/service like git instead to blend in for long term persistence for example at /home/git/.ssh/authorized_keys
login :D
ssh -i ~/.ssh/backdoor_key user@target
add to startup/initialization scripts:
list of such scripts:
# gotta look into this one moreetc/init.d# bash/etc/bash.bashrc~/.bashrc## shell initialization scripts/etc/rc.d/*/etc/rc.localetc/systemd/systemusr/lib/systemd/userusr/lib/systemd/system# xdg autostart script /etc/xdg/autostart# user logon script /etc/profile.d