Skip to main content

pw ssh

Initiate an SSH connection to a resource

Synopsis

The pw ssh command initiates an SSH connection to a specific compute resource. The resource has to be running, and you must have SSH access to it.

pw ssh <resource> [command] [flags]

Examples

  # Interactively connect to a resource named 'my-resource' in the 'Jake.Thayne' namespace
pw ssh pw://Jake.Thayne/my-resource

# Interactively connect to your user workspace
pw ssh workspace

# Run the "hostname" command on a resource and exit
pw ssh pw://Jake.Thayne/my-resource hostname

# Run the "hostname" command on your user workspace and exit
pw ssh workspace hostname

# Run as a ProxyCommand for SSH
ssh -o ProxyCommand="pw ssh --proxy-command %h" user@pw://Jake.Thayne/my-resource
ssh -o ProxyCommand="pw ssh --proxy-command %h" user@workspace

# Run as a ProxyCommand for SSH, with port forward
ssh -L 8080:localhost:80 -o ProxyCommand="pw ssh --proxy-command %h" user@pw://Jake.Thayne/my-resource
ssh -R 80:localhost:8000 -o ProxyCommand="pw ssh --proxy-command %h" user@workspace

# Run as a ProxyCommand for SCP
scp -O -o ProxyCommand="pw ssh --proxy-command %h" file.txt user@pw://Jake.Thayne/my-resource:/home/user/file.txt
scp -O -o ProxyCommand="pw ssh --proxy-command %h" file.txt user@workspace:/home/user/file.txt

Options

  -h, --help            help for ssh
--proxy-command Run as a proxy command for SSH or SCP

Options inherited from parent commands

      --platform-host string   The Parallel Works platform host to use. Will override any other platform host settings.
-v, --verbose Enable verbose logging

SEE ALSO

  • pw - The Parallel Works CLI