# SSH Client Flags for Fast Enumeration and Compatibility Checks

- **URL:** https://hackindex.io/services/ssh/enumeration/ssh-client-flags-for-enumeration
- **Path:** SSH > Enumeration
- **Up:** [Enumeration](https://hackindex.io/services/ssh/enumeration.md)
- **Published:** 2026-01-03
- **Updated:** 2026-01-04

Use SSH client options to keep enumeration reproducible, non-interactive, and useful for confirming legacy crypto acceptance.

## Clean connects for noisy environments

If you are hitting many ephemeral targets and host keys are not valuable, disabling checks removes friction. In real work, use this deliberately because it discards host key signal and makes MITM harder to notice.

```bash
ssh -p $PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $USERNAME@$TARGET_IP
```

When you only want a quick “does it respond” probe without hanging on prompts, force BatchMode and a short timeout.

```bash
ssh -p $PORT -o BatchMode=yes -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $USERNAME@$TARGET_IP exit
```

## SSH Verbose Debug Flags for Negotiation

`-vvv` is the fastest way to see why your client and the server do not agree. This is where you confirm what auth methods are offered, which KEX and host key algorithms were selected, whether the server rejects modern defaults, and why it disconnects.

```bash
ssh -vvv -p $PORT -o BatchMode=yes $USERNAME@$TARGET_IP exit
```

Key flags used throughout this page:

- `-vvv` for maximum debug verbosity
- `-o BatchMode=yes` to suppress interactive prompts
- `-o StrictHostKeyChecking=no` to skip host key verification
- `-o ConnectTimeout=5` for quick timeout on unresponsive hosts
- `-c` to force a specific cipher for acceptance testing

Two common error patterns that tell you to move into legacy forcing:

```
no matching key exchange method found
```

```
no matching host key type found
```

## Legacy cipher acceptance checks

If you already saw CBC in `ssh2-enum-algos`, confirming acceptance with a forced cipher is a clean way to document it without guessing.

```bash
ssh -p $PORT -c aes128-cbc $USERNAME@$TARGET_IP
```

You can also validate legacy host key acceptance when you suspect old `ssh-rsa` dependencies. This stays enumeration as long as you are only proving what the target will negotiate.

```bash
ssh -p $PORT -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa $USERNAME@$TARGET_IP
```

## Combined legacy KEX and ssh-rsa acceptance

Some targets only become reachable when you force both the KEX and the host key algorithms together. This is common on older appliances and badly hardened SSH stacks.

```bash
ssh -p $PORT -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa $USERNAME@$TARGET_IP
```

If you only want proof of acceptance without an interactive session:

```bash
ssh -p $PORT -o BatchMode=yes -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa $USERNAME@$TARGET_IP exit
```

If you need to confirm group1 acceptance because it appeared in algorithm enumeration, force it alone and note whether the server negotiates it.

```bash
ssh -p $PORT -o KexAlgorithms=+diffie-hellman-group1-sha1 $USERNAME@$TARGET_IP
```

## References

- [ssh(1) Manual Page](https://man.openbsd.org/ssh) - Client options for verbosity, host key handling, cipher selection, and algorithm forcing.
- [ssh_config(5) Manual Page](https://man.openbsd.org/ssh_config) - Client-side configuration keywords for ciphers, KEX, and host key algorithms.
