cloudx-proxy 0.4.7__tar.gz → 0.4.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloudx_proxy-0.4.9/.clinerules +103 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/CHANGELOG.md +9 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/PKG-INFO +34 -1
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/README.md +33 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy/_version.py +2 -2
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy/cli.py +101 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy.egg-info/PKG-INFO +34 -1
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy.egg-info/SOURCES.txt +1 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/.github/workflows/release.yml +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/.gitignore +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/.releaserc +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/CONTRIBUTING.md +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/LICENSE +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy/_1password.py +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy/__init__.py +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy/core.py +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy/setup.py +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy.egg-info/dependency_links.txt +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy.egg-info/entry_points.txt +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy.egg-info/requires.txt +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/cloudx_proxy.egg-info/top_level.txt +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/package.json +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/pyproject.toml +0 -0
- {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.9}/setup.cfg +0 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
# cloudX-proxy
|
2
|
+
|
3
|
+
CloudX is a development environment consisting of
|
4
|
+
|
5
|
+
- a local VSCode installation
|
6
|
+
- a remote development server (EC2 instance) running with auto-shutdown
|
7
|
+
|
8
|
+
The AWS side consists of the following components:
|
9
|
+
|
10
|
+
- an CloudX-environment
|
11
|
+
- a CloudX-user
|
12
|
+
- a CloudX-instance
|
13
|
+
|
14
|
+
The CloudX-environment is a set of resources that are used to run the CloudX-instance.
|
15
|
+
Most importantly, it defines the VPC subnet where the instances are launched.
|
16
|
+
|
17
|
+
A CloudX-user is an IAM user with the necessary permissions to manage their CloudX-instance(s) based on a ABAC tag defined in the cloudX-environment.
|
18
|
+
|
19
|
+
A CloudX-instance is an EC2 instance that is launched in the CloudX-environment.
|
20
|
+
It's most important feature is that it is automatically stopped after a certain period of inactivity.
|
21
|
+
|
22
|
+
The AWS components are deployed from AWS Service Catalog.
|
23
|
+
|
24
|
+
The cloudX-proxy is a tool that allows you to access the remote development server from your local VSCode installation over an ssh connection established by the cloudX-proxy. The cloudX-proxy takes care of starting the instance should it be stopped. Also, it pushes an ssh key to the instance to allow you to connect to it. Given that the proxy uses AWS Systems Manager to initiate the connection, you don't need to open any inbound ports in the security group of the instance.
|
25
|
+
|
26
|
+
## Architecture
|
27
|
+
|
28
|
+
### SSH Configuration Structure
|
29
|
+
|
30
|
+
CloudX-proxy uses a hierarchical three-tier SSH configuration approach:
|
31
|
+
|
32
|
+
1. **Generic Configuration (cloudx-*)**: Common settings for all environments
|
33
|
+
- User settings (ec2-user)
|
34
|
+
- TCP keepalive
|
35
|
+
- SSH multiplexing configuration
|
36
|
+
|
37
|
+
2. **Environment Configuration (cloudx-{env}-*)**: Environment-specific settings
|
38
|
+
- Authentication configuration (identity settings)
|
39
|
+
- ProxyCommand with environment-specific parameters
|
40
|
+
|
41
|
+
3. **Host Configuration (cloudx-{env}-hostname)**: Instance-specific settings
|
42
|
+
- HostName (instance ID)
|
43
|
+
- Optional overrides for incompatible settings
|
44
|
+
|
45
|
+
This tiered approach minimizes configuration duplication and makes it clear which settings apply broadly and which are specific to an environment or host.
|
46
|
+
|
47
|
+
### Security Model
|
48
|
+
|
49
|
+
The primary security boundary is enforced through AWS IAM via Systems Manager (SSM) and EC2 Instance Connect:
|
50
|
+
- Only authenticated AWS users with appropriate IAM permissions can establish SSM sessions
|
51
|
+
- EC2 Instance Connect allows temporary injection of SSH public keys
|
52
|
+
- No inbound SSH ports need to be exposed, as all connections are through AWS SSM's secure tunneling
|
53
|
+
- All connection attempts and key pushes are logged in AWS CloudTrail
|
54
|
+
|
55
|
+
## Operating Modes
|
56
|
+
|
57
|
+
CloudX-proxy runs in either of two modes:
|
58
|
+
|
59
|
+
- setup
|
60
|
+
- connect
|
61
|
+
|
62
|
+
### Setup Mode
|
63
|
+
|
64
|
+
With setup mode, the config files and directories for the connect mode are established. The setup mode is typically only run once per CloudX-instance. When running setup, the user is asked for their AWS AK/SK of the IAM user created as CloudX-user. This will be stored in ~/.aws/credentials. Alternatively the user can store this data themselves in ~/.aws/credentials. The profile name is 'vscode' by default, but can be overruled with the --profile option. When multiple instances are used, it is recommended to use a profile cloudx-env-user where env is the environment and user the username.
|
65
|
+
|
66
|
+
By default an ssh key named vscode will be used - and created if not available in the configuration directory (~/.ssh/vscode). The user can specify a different key with the --ssh-key option.
|
67
|
+
|
68
|
+
A 'Host cloudx-{env}-*' entry will be created in the ~/.ssh/vscode/config file for each environment. A user can potentially have multiple instances in a single environment as well as multiple environments.
|
69
|
+
|
70
|
+
#### Setup Options
|
71
|
+
|
72
|
+
- **--profile**: AWS profile to use (default: 'vscode')
|
73
|
+
- **--ssh-key**: SSH key name to use (default: 'vscode')
|
74
|
+
- **--ssh-config**: SSH config file to use (default: ~/.ssh/vscode/config)
|
75
|
+
- **--aws-env**: AWS environment directory (default: ~/.aws)
|
76
|
+
- **--1password**: Use 1Password SSH agent for SSH authentication
|
77
|
+
- **--instance**: EC2 instance ID to set up connection for
|
78
|
+
- **--hostname**: Hostname to use for SSH configuration (without this, hostname will be generated from instance ID or prompted)
|
79
|
+
- **--yes**: Non-interactive mode, use default values for all prompts
|
80
|
+
|
81
|
+
### Connect Mode
|
82
|
+
|
83
|
+
In connect mode, the actual connection is established. This is not used by the user directly, but in the ssh configuration as a proxy command. The command is run using uvx.
|
84
|
+
|
85
|
+
### 1Password Integration
|
86
|
+
|
87
|
+
When the --1password option is used:
|
88
|
+
1. CloudX-proxy first checks if any SSH key with the specified name exists in any 1Password vault
|
89
|
+
2. If the key exists, it's reused (the public key is exported to the filesystem)
|
90
|
+
3. If the key doesn't exist, the user selects which vault to store the newly created key in
|
91
|
+
4. The SSH configuration uses the 1Password SSH agent socket and the public key
|
92
|
+
|
93
|
+
### Automation Support
|
94
|
+
|
95
|
+
The --yes option enables non-interactive mode for use in scripts and automated processes:
|
96
|
+
- All prompts use default values
|
97
|
+
- Hostname is automatically generated based on instance ID
|
98
|
+
- AWS profile must already be configured
|
99
|
+
- EC2 instance ID must be provided with the --instance option
|
100
|
+
|
101
|
+
## Future Considerations
|
102
|
+
|
103
|
+
[Potential Breaking Change] Replacing all default values from 'vscode' to 'cloudx' would align the naming but would be a breaking change. This would affect default profile names, SSH key names, and configuration directories.
|
@@ -1,3 +1,12 @@
|
|
1
|
+
## [0.4.9](https://github.com/easytocloud/cloudX-proxy/compare/v0.4.8...v0.4.9) (2025-03-12)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* added list command ([76e43e4](https://github.com/easytocloud/cloudX-proxy/commit/76e43e449ec2f704475014f95d0a345e322be8e8))
|
7
|
+
|
8
|
+
## [0.4.8](https://github.com/easytocloud/cloudX-proxy/compare/v0.4.7...v0.4.8) (2025-03-07)
|
9
|
+
|
1
10
|
## [0.4.7](https://github.com/easytocloud/cloudX-proxy/compare/v0.4.6...v0.4.7) (2025-03-07)
|
2
11
|
|
3
12
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: cloudx-proxy
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.9
|
4
4
|
Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
|
5
5
|
Author-email: easytocloud <info@easytocloud.com>
|
6
6
|
License: MIT License
|
@@ -119,6 +119,9 @@ uvx cloudx-proxy setup --ssh-config ~/.ssh/cloudx/config
|
|
119
119
|
# Setup with 1Password integration
|
120
120
|
uvx cloudx-proxy setup --1password
|
121
121
|
|
122
|
+
# Setup with non-interactive automation
|
123
|
+
uvx cloudx-proxy setup --instance i-0123456789abcdef0 --hostname myserver --yes
|
124
|
+
|
122
125
|
# Combine options
|
123
126
|
uvx cloudx-proxy setup --profile myprofile --ssh-key mykey --ssh-config ~/.ssh/cloudx/config --1password --aws-env prod
|
124
127
|
```
|
@@ -274,6 +277,9 @@ Options:
|
|
274
277
|
- `--ssh-config` (optional): Path to the SSH config file to use. If specified, configuration and keys will be stored in this location. Default is ~/.ssh/vscode/config.
|
275
278
|
- `--1password` (flag): Enable 1Password SSH agent integration. Creates keys directly in 1Password and configures SSH to use the 1Password SSH agent.
|
276
279
|
- `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
|
280
|
+
- `--instance` (optional): EC2 instance ID to set up connection for. If provided, skips the instance ID prompt.
|
281
|
+
- `--hostname` (optional): Hostname to use for SSH configuration. If not provided, a hostname will be generated from the instance ID in non-interactive mode or prompted for in interactive mode.
|
282
|
+
- `--yes` (flag): Non-interactive mode, use default values for all prompts. Requires sufficient defaults or explicit parameters for all required values.
|
277
283
|
|
278
284
|
Example usage:
|
279
285
|
```bash
|
@@ -323,6 +329,33 @@ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env pr
|
|
323
329
|
|
324
330
|
Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
|
325
331
|
|
332
|
+
#### List Command
|
333
|
+
```bash
|
334
|
+
uvx cloudx-proxy list [OPTIONS]
|
335
|
+
```
|
336
|
+
|
337
|
+
Options:
|
338
|
+
- `--ssh-config` (optional): Path to the SSH config file to use. If not specified, uses ~/.ssh/vscode/config.
|
339
|
+
- `--environment` (optional): Filter hosts by environment (e.g., dev, prod). If not specified, shows all environments.
|
340
|
+
- `--detailed` (flag): Show detailed information including instance IDs.
|
341
|
+
|
342
|
+
Example usage:
|
343
|
+
```bash
|
344
|
+
# List all configured hosts
|
345
|
+
uvx cloudx-proxy list
|
346
|
+
|
347
|
+
# List hosts in a specific environment
|
348
|
+
uvx cloudx-proxy list --environment dev
|
349
|
+
|
350
|
+
# List hosts with detailed information
|
351
|
+
uvx cloudx-proxy list --detailed
|
352
|
+
|
353
|
+
# List hosts from a custom SSH config
|
354
|
+
uvx cloudx-proxy list --ssh-config ~/.ssh/cloudx/config
|
355
|
+
```
|
356
|
+
|
357
|
+
The list command displays all configured cloudx-proxy hosts, grouped by environment. It provides a quick overview of available connections and can help troubleshoot SSH configuration issues.
|
358
|
+
|
326
359
|
### VSCode
|
327
360
|
|
328
361
|
1. Click the "Remote Explorer" icon in the VSCode sidebar
|
@@ -69,6 +69,9 @@ uvx cloudx-proxy setup --ssh-config ~/.ssh/cloudx/config
|
|
69
69
|
# Setup with 1Password integration
|
70
70
|
uvx cloudx-proxy setup --1password
|
71
71
|
|
72
|
+
# Setup with non-interactive automation
|
73
|
+
uvx cloudx-proxy setup --instance i-0123456789abcdef0 --hostname myserver --yes
|
74
|
+
|
72
75
|
# Combine options
|
73
76
|
uvx cloudx-proxy setup --profile myprofile --ssh-key mykey --ssh-config ~/.ssh/cloudx/config --1password --aws-env prod
|
74
77
|
```
|
@@ -224,6 +227,9 @@ Options:
|
|
224
227
|
- `--ssh-config` (optional): Path to the SSH config file to use. If specified, configuration and keys will be stored in this location. Default is ~/.ssh/vscode/config.
|
225
228
|
- `--1password` (flag): Enable 1Password SSH agent integration. Creates keys directly in 1Password and configures SSH to use the 1Password SSH agent.
|
226
229
|
- `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
|
230
|
+
- `--instance` (optional): EC2 instance ID to set up connection for. If provided, skips the instance ID prompt.
|
231
|
+
- `--hostname` (optional): Hostname to use for SSH configuration. If not provided, a hostname will be generated from the instance ID in non-interactive mode or prompted for in interactive mode.
|
232
|
+
- `--yes` (flag): Non-interactive mode, use default values for all prompts. Requires sufficient defaults or explicit parameters for all required values.
|
227
233
|
|
228
234
|
Example usage:
|
229
235
|
```bash
|
@@ -273,6 +279,33 @@ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env pr
|
|
273
279
|
|
274
280
|
Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
|
275
281
|
|
282
|
+
#### List Command
|
283
|
+
```bash
|
284
|
+
uvx cloudx-proxy list [OPTIONS]
|
285
|
+
```
|
286
|
+
|
287
|
+
Options:
|
288
|
+
- `--ssh-config` (optional): Path to the SSH config file to use. If not specified, uses ~/.ssh/vscode/config.
|
289
|
+
- `--environment` (optional): Filter hosts by environment (e.g., dev, prod). If not specified, shows all environments.
|
290
|
+
- `--detailed` (flag): Show detailed information including instance IDs.
|
291
|
+
|
292
|
+
Example usage:
|
293
|
+
```bash
|
294
|
+
# List all configured hosts
|
295
|
+
uvx cloudx-proxy list
|
296
|
+
|
297
|
+
# List hosts in a specific environment
|
298
|
+
uvx cloudx-proxy list --environment dev
|
299
|
+
|
300
|
+
# List hosts with detailed information
|
301
|
+
uvx cloudx-proxy list --detailed
|
302
|
+
|
303
|
+
# List hosts from a custom SSH config
|
304
|
+
uvx cloudx-proxy list --ssh-config ~/.ssh/cloudx/config
|
305
|
+
```
|
306
|
+
|
307
|
+
The list command displays all configured cloudx-proxy hosts, grouped by environment. It provides a quick overview of available connections and can help troubleshoot SSH configuration issues.
|
308
|
+
|
276
309
|
### VSCode
|
277
310
|
|
278
311
|
1. Click the "Remote Explorer" icon in the VSCode sidebar
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
import sys
|
3
|
+
import re
|
4
|
+
from pathlib import Path
|
3
5
|
import click
|
4
6
|
from . import __version__
|
5
7
|
from .core import CloudXProxy
|
@@ -123,5 +125,104 @@ def setup(profile: str, ssh_key: str, ssh_config: str, aws_env: str, use_1passwo
|
|
123
125
|
print(f"\n\033[91mError: {str(e)}\033[0m", file=sys.stderr)
|
124
126
|
sys.exit(1)
|
125
127
|
|
128
|
+
@cli.command()
|
129
|
+
@click.option('--ssh-config', help='SSH config file to use (default: ~/.ssh/vscode/config)')
|
130
|
+
@click.option('--environment', help='Filter hosts by environment (e.g., dev, prod)')
|
131
|
+
@click.option('--detailed', is_flag=True, help='Show detailed information including instance IDs')
|
132
|
+
def list(ssh_config: str, environment: str, detailed: bool):
|
133
|
+
"""List configured cloudx-proxy SSH hosts.
|
134
|
+
|
135
|
+
This command parses the SSH configuration file and displays all configured cloudx-proxy hosts.
|
136
|
+
Hosts are grouped by environment for easier navigation.
|
137
|
+
|
138
|
+
Example usage:
|
139
|
+
cloudx-proxy list
|
140
|
+
cloudx-proxy list --environment dev
|
141
|
+
cloudx-proxy list --ssh-config ~/.ssh/cloudx/config
|
142
|
+
cloudx-proxy list --detailed
|
143
|
+
"""
|
144
|
+
try:
|
145
|
+
# Determine SSH config file path
|
146
|
+
if ssh_config:
|
147
|
+
config_file = Path(os.path.expanduser(ssh_config))
|
148
|
+
else:
|
149
|
+
config_file = Path(os.path.expanduser("~/.ssh/vscode/config"))
|
150
|
+
|
151
|
+
if not config_file.exists():
|
152
|
+
print(f"SSH config file not found: {config_file}")
|
153
|
+
print("Run 'cloudx-proxy setup' to create a configuration.")
|
154
|
+
sys.exit(1)
|
155
|
+
|
156
|
+
# Read SSH config file
|
157
|
+
config_content = config_file.read_text()
|
158
|
+
|
159
|
+
# Parse hosts using regex
|
160
|
+
# Match Host entries for cloudx hosts
|
161
|
+
host_pattern = r'Host\s+(cloudx-[^\s]+)(?:\s*\n(?:(?!\s*Host\s+).)*?HostName\s+([^\s]+))?'
|
162
|
+
hosts = re.finditer(host_pattern, config_content, re.DOTALL)
|
163
|
+
|
164
|
+
# Group hosts by environment
|
165
|
+
environments = {}
|
166
|
+
generic_hosts = []
|
167
|
+
|
168
|
+
for match in hosts:
|
169
|
+
hostname = match.group(1)
|
170
|
+
instance_id = match.group(2) if match.group(2) else "N/A"
|
171
|
+
|
172
|
+
# Skip generic patterns like cloudx-* or cloudx-dev-*
|
173
|
+
if hostname.endswith('*'):
|
174
|
+
generic_hosts.append((hostname, instance_id))
|
175
|
+
continue
|
176
|
+
|
177
|
+
# Extract environment from hostname (format: cloudx-{env}-{name})
|
178
|
+
parts = hostname.split('-')
|
179
|
+
if len(parts) >= 3:
|
180
|
+
env = parts[1]
|
181
|
+
name = '-'.join(parts[2:])
|
182
|
+
|
183
|
+
# Filter by environment if specified
|
184
|
+
if environment and env != environment:
|
185
|
+
continue
|
186
|
+
|
187
|
+
if env not in environments:
|
188
|
+
environments[env] = []
|
189
|
+
|
190
|
+
environments[env].append((hostname, name, instance_id))
|
191
|
+
|
192
|
+
# Display results
|
193
|
+
if not environments and not generic_hosts:
|
194
|
+
print("No cloudx-proxy hosts configured.")
|
195
|
+
print("Run 'cloudx-proxy setup' to configure a host.")
|
196
|
+
return
|
197
|
+
|
198
|
+
# Print header
|
199
|
+
print(f"\n\033[1;95m=== cloudx-proxy Configured Hosts ===\033[0m\n")
|
200
|
+
|
201
|
+
# Print generic patterns if any and detailed mode
|
202
|
+
if generic_hosts and detailed:
|
203
|
+
print("\033[1;94mGeneric Patterns:\033[0m")
|
204
|
+
for hostname, instance_id in generic_hosts:
|
205
|
+
print(f" {hostname}")
|
206
|
+
print()
|
207
|
+
|
208
|
+
# Print environments and hosts
|
209
|
+
for env, hosts in sorted(environments.items()):
|
210
|
+
print(f"\033[1;94mEnvironment: {env}\033[0m")
|
211
|
+
for hostname, name, instance_id in sorted(hosts, key=lambda x: x[1]):
|
212
|
+
if detailed:
|
213
|
+
print(f" {name} \033[90m({hostname})\033[0m -> \033[93m{instance_id}\033[0m")
|
214
|
+
else:
|
215
|
+
print(f" {name} \033[90m({hostname})\033[0m")
|
216
|
+
print()
|
217
|
+
|
218
|
+
# Print usage hint
|
219
|
+
print("\033[1;93mUsage:\033[0m")
|
220
|
+
print(" Connect with SSH: \033[96mssh <hostname>\033[0m")
|
221
|
+
print(" Connect with VSCode: Use Remote Explorer in VSCode")
|
222
|
+
|
223
|
+
except Exception as e:
|
224
|
+
print(f"Error: {str(e)}", file=sys.stderr)
|
225
|
+
sys.exit(1)
|
226
|
+
|
126
227
|
if __name__ == '__main__':
|
127
228
|
cli()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: cloudx-proxy
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.9
|
4
4
|
Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
|
5
5
|
Author-email: easytocloud <info@easytocloud.com>
|
6
6
|
License: MIT License
|
@@ -119,6 +119,9 @@ uvx cloudx-proxy setup --ssh-config ~/.ssh/cloudx/config
|
|
119
119
|
# Setup with 1Password integration
|
120
120
|
uvx cloudx-proxy setup --1password
|
121
121
|
|
122
|
+
# Setup with non-interactive automation
|
123
|
+
uvx cloudx-proxy setup --instance i-0123456789abcdef0 --hostname myserver --yes
|
124
|
+
|
122
125
|
# Combine options
|
123
126
|
uvx cloudx-proxy setup --profile myprofile --ssh-key mykey --ssh-config ~/.ssh/cloudx/config --1password --aws-env prod
|
124
127
|
```
|
@@ -274,6 +277,9 @@ Options:
|
|
274
277
|
- `--ssh-config` (optional): Path to the SSH config file to use. If specified, configuration and keys will be stored in this location. Default is ~/.ssh/vscode/config.
|
275
278
|
- `--1password` (flag): Enable 1Password SSH agent integration. Creates keys directly in 1Password and configures SSH to use the 1Password SSH agent.
|
276
279
|
- `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
|
280
|
+
- `--instance` (optional): EC2 instance ID to set up connection for. If provided, skips the instance ID prompt.
|
281
|
+
- `--hostname` (optional): Hostname to use for SSH configuration. If not provided, a hostname will be generated from the instance ID in non-interactive mode or prompted for in interactive mode.
|
282
|
+
- `--yes` (flag): Non-interactive mode, use default values for all prompts. Requires sufficient defaults or explicit parameters for all required values.
|
277
283
|
|
278
284
|
Example usage:
|
279
285
|
```bash
|
@@ -323,6 +329,33 @@ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env pr
|
|
323
329
|
|
324
330
|
Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
|
325
331
|
|
332
|
+
#### List Command
|
333
|
+
```bash
|
334
|
+
uvx cloudx-proxy list [OPTIONS]
|
335
|
+
```
|
336
|
+
|
337
|
+
Options:
|
338
|
+
- `--ssh-config` (optional): Path to the SSH config file to use. If not specified, uses ~/.ssh/vscode/config.
|
339
|
+
- `--environment` (optional): Filter hosts by environment (e.g., dev, prod). If not specified, shows all environments.
|
340
|
+
- `--detailed` (flag): Show detailed information including instance IDs.
|
341
|
+
|
342
|
+
Example usage:
|
343
|
+
```bash
|
344
|
+
# List all configured hosts
|
345
|
+
uvx cloudx-proxy list
|
346
|
+
|
347
|
+
# List hosts in a specific environment
|
348
|
+
uvx cloudx-proxy list --environment dev
|
349
|
+
|
350
|
+
# List hosts with detailed information
|
351
|
+
uvx cloudx-proxy list --detailed
|
352
|
+
|
353
|
+
# List hosts from a custom SSH config
|
354
|
+
uvx cloudx-proxy list --ssh-config ~/.ssh/cloudx/config
|
355
|
+
```
|
356
|
+
|
357
|
+
The list command displays all configured cloudx-proxy hosts, grouped by environment. It provides a quick overview of available connections and can help troubleshoot SSH configuration issues.
|
358
|
+
|
326
359
|
### VSCode
|
327
360
|
|
328
361
|
1. Click the "Remote Explorer" icon in the VSCode sidebar
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|