# replicated vm scp-endpoint

Get the SCP endpoint of a VM

### Synopsis

Get the SCP endpoint and port of a VM.

The output will be in the format: scp://username@hostname:port

You can identify the VM either by its unique ID or by its name.

By default, the username in the endpoint is the GitHub username linked to your Vendor Portal account. If the VM was created with 'replicated vm create --ssh-public-key', the Linux user on the VM is derived from the key's comment (the portion before the first '@') instead — pass that username via --username so the endpoint matches the user the key was added to.

Note: SCP endpoints can only be retrieved from VMs in the "running" state.

VMs are currently a beta feature.

```
replicated vm scp-endpoint VM_ID_OR_NAME [flags]
```

### Examples

```
# Get SCP endpoint for a specific VM by ID
replicated vm scp-endpoint aaaaa11

# Get SCP endpoint for a specific VM by name
replicated vm scp-endpoint my-test-vm

# Get SCP endpoint with a custom username
replicated vm scp-endpoint my-test-vm --username custom-user

# Use the endpoint to SCP a file to a VM by name
scp /tmp/my-file $(replicated vm scp-endpoint my-test-vm)//dst/path/my-file

# Use the endpoint to SCP a file from a VM by name
scp $(replicated vm scp-endpoint my-test-vm)//src/path/my-file /tmp/my-file
```

### Options

```
  -h, --help              help for scp-endpoint
      --username string   Custom username to use in SCP endpoint instead of the GitHub username set in Vendor Portal. If the VM was created with 'replicated vm create --ssh-public-key', set this to the username derived from the key's comment (the portion before the first '@') so the endpoint matches the user the key was added to.
```

### Options inherited from parent commands

```
      --app string       The app slug or app id to use in all calls
      --debug            Enable debug output
      --profile string   The authentication profile to use for this command
      --token string     The API token to use to access your app in the Vendor API
```

### SEE ALSO

* [replicated vm](replicated-cli-vm)	 - Manage test virtual machines.