> ## Documentation Index
> Fetch the complete documentation index at: https://www.0101isnothacking.nl/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH enumeration

> Active enumeration commands and notes for connecting to older SSH implementations.

SSH (Secure Shell) typically runs on port 22.

> [!WARNING]
>
> If we try to log in to SSH, even once, while it is under exploitation, it will be noticed as an exploitation. Do not log in to SSH during active exploitation.

## Version detection

```bash theme={null}
netcat -nv ip 22
nmap -sV -p22 ip
nxc ssh 192.168.117.140 -u '' -p ''
```

## Connect to old SSH

With some old SSH versions we have to select the type of encryption and the cipher, as shown in the picture below. We first log in and get the supported encryption, then log in again to get the cipher.

![Old SSH cipher selection](https://mintcdn.com/non-9fcb5a21/P-t86H21MW2fT7Il/images/97fec41ffac1.png?fit=max\&auto=format\&n=P-t86H21MW2fT7Il\&q=85\&s=05191d19fdc997be6bccce81b3357d5c)

```bash theme={null}
ssh target_ip -oKexAlgorithms=+typeencryption -c type_cipher
```

## Steps

![SSH enumeration steps](https://mintcdn.com/non-9fcb5a21/P-t86H21MW2fT7Il/images/00ba823b4d3b.png?fit=max\&auto=format\&n=P-t86H21MW2fT7Il\&q=85\&s=6c316515c158977b5ff79314ec0664de)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.