SSH Access & Key-based Attempts

Key auth and verbose debugging for SSH.

ssh -i /file/path/to/ssh-login/rsa_keyy -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -vvv root@<target>

Use a private key and verbose debug (-vvv) to inspect auth issues; -o IdenitiesOnly forces only that key to be used.

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@<target>

Force password auth only (useful when server prefers other methods).

ssh -p 2222 user@<target>

Specify non-standard SSH port. Nmap scans can locate non-standard ports.

scp -i /path/keyfile localfile user@<target>:/tmp/

Copy files to the target via SCP using keyfile.

ssh-keygen -y -f /path/to/private_key > public_from_private.pub

Derive the public key from a private key (useful for validating keys).