<commit_before>---
title: CLI Tunneling
---

<p class="note">Note: Applies to CLI v2.</p>

CLI supports tunneling all of its traffic (HTTP and SSH) through a SOCKS 5 proxy specified via `BOSH_ALL_PROXY` environment variable. (Custom environment variable was chosen instead of using `all_proxy` environment variable to avoid accidently tunneling non-CLI traffic.)

Common use cases for tunneling through a jumpbox VM include:

- deploing Director VM with `bosh create-env` command
- accessing the Director and UAA APIs

<pre class="terminal">
# set a tunnel
$ ssh -D 5000 jumpbox@jumpbox-ip -i jumpbox.key

# let CLI know via environment variable
$ export BOSH_ALL_PROXY=socks5://localhost:5000

$ bosh create-env bosh-deployment/bosh.yml ...
$ bosh alias-env aws -e director-ip --ca-cert ...
</pre><commit_msg>Typo: "deploying" needs a "y"<commit_after>---
title: CLI Tunneling
---

<p class="note">Note: Applies to CLI v2.</p>

CLI supports tunneling all of its traffic (HTTP and SSH) through a SOCKS 5 proxy specified via `BOSH_ALL_PROXY` environment variable. (Custom environment variable was chosen instead of using `all_proxy` environment variable to avoid accidently tunneling non-CLI traffic.)

Common use cases for tunneling through a jumpbox VM include:

- deploying Director VM with `bosh create-env` command
- accessing the Director and UAA APIs

<pre class="terminal">
# set a tunnel
$ ssh -D 5000 jumpbox@jumpbox-ip -i jumpbox.key

# let CLI know via environment variable
$ export BOSH_ALL_PROXY=socks5://localhost:5000

$ bosh create-env bosh-deployment/bosh.yml ...
$ bosh alias-env aws -e director-ip --ca-cert ...
</pre>
{'fraction_non_alphanumeric': 0.09712889431887599, 'fraction_numerical': 0.013439218081857055, 'mean_word_length': 4.266881028938907, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1512371', 'n_tokens_mistral': 537, 'n_tokens_neox': 498, 'n_words': 201}