# Basic Authentication with HTTP Tunnel

> Enable Basic Authentication with Pinggy HTTP tunnels. Learn how to configure and start tunnels with username and password for added security.
> Source: https://pinggy.io/docs/http_tunnels/basic_auth/


# Basic Authentication

Pinggy provides a mechanism to authenticate visitor connections using basic
authentication. With basic authentication, browser would prompt visitor to insert client selected username:password as follows:

![Basic Authentication](/doc_img/basic_authentication.png)


**Note: Both the username and password provided for basic authentication cannot contain the ':' (colon) character.**

Client can enable basic authentication as follows:


```bash
# SSH - no install, works anywhere the ssh client is available
ssh -p 443 -R0:localhost:8000 -t free.pinggy.io b:username:password
```

```bash
# Pinggy CLI - install with: npm install -g pinggy (or download the binary)
./pinggy -p 443 -R0:localhost:8000 -t free.pinggy.io b:username:password
```


One can add multiple username:password combination as follows:

```bash
# SSH - no install, works anywhere the ssh client is available
ssh -p 443 -R0:localhost:8000 -t free.pinggy.io b:username1:password1 b:username2:password2
```

```bash
# Pinggy CLI - install with: npm install -g pinggy (or download the binary)
./pinggy -p 443 -R0:localhost:8000 -t free.pinggy.io b:username1:password1 b:username2:password2
```


You can customize the command here:


```bash
# HTTP tunnel forwarding localhost:8000
ssh -p 443 -R0:localhost:8000 free.pinggy.io
```


Configure more options (authentication, web debugger, custom domains, IP whitelisting, header rules) interactively at https://pinggy.io/docs/http_tunnels/basic_auth/


