https://github.com/moriyoshi/az-cloud-shell-access
Access to Azure Cloud Shell from within a Unix terminal
https://github.com/moriyoshi/az-cloud-shell-access
azure cloudshell shell terminal
Last synced: 2 months ago
JSON representation
Access to Azure Cloud Shell from within a Unix terminal
- Host: GitHub
- URL: https://github.com/moriyoshi/az-cloud-shell-access
- Owner: moriyoshi
- License: mit
- Created: 2021-09-19T11:53:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-16T14:41:16.000Z (almost 3 years ago)
- Last Synced: 2025-03-07T02:49:06.335Z (2 months ago)
- Topics: azure, cloudshell, shell, terminal
- Language: Go
- Homepage:
- Size: 55.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# az-cloud-shell-access
## What is this?
This is a tiny program that allows one to connect to Azure Cloud Shell
from within the ordinary Unix terminal, not from the web browser.## Usage
You need to get your resource group and storage account ready by opening up Cloud Shell at Azure Portal at least once.
https://shell.azure.com/
If you've already set up azure CLI, then just type
```
$ ./az-cloud-shell-access shell
```to connect to the cloud shell instance that resides within the tenant of the default subscription.
If you want to use the instance in the different tenant, specify `AZURE_TENANT_ID` environment variable.
### HTTP forwarding
Azure Cloud Shell has built-in HTTP forward proxy support.
```
$ ./az-cloud-shell-access proxy --port 8092 --local-addr :8080
```will instruct Azure Cloud Shell control plane and az-cloud-shell-access to forward HTTP requests to the local address `:8080` to the remote address `127.0.0.1:8092`.
The remote port must be in range of 1025-8079 and 8091-49151.
## The protocol
Details are taken from windows Terminal's Azure Cloud Shell connector.
https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalConnection/AzureConnection.cpp