# Authentication

### VNC Authentication

#### Testing credentials

Some VNC servers do not require a username. In such cases, the username field should be left empty, as illustrated in the results below.

```bash
nxc vnc <ip> -u '' -p 'password'
```

Expected Results:

```bash
nxc vnc <ip> -u '' -p 'password'
VNC         <ip>   5900   <ip>    [*] RFB 3.8
VNC         <ip>   5900   <ip>    [+] password (Pwn3d!)
```

#### Specify port

```bash
nxc vnc <ip> --port <port>
```

#### Unauthenticated access

When the VNC server doesn't require authentication, the following output can be expected.

```bash
nxc vnc <ip>
VNC         <ip>   5900   <ip>    [*] RFB 3.8 (No Auth:True)
```

#### VNC sleep

Increase the VNC socket connection sleep interval to prevent rate limiting.

```bash
nxc vnc <ip> --vnc-sleep 5
```


---

# 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://www.netexec.wiki/vnc-protocol/authentication.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.
