Initiate an SSH connection to a resource
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.
Resource names can be specified in two formats:
pw ssh <resource> [command] [flags]
# Interactively connect to a resource named 'my-resource' owned by you
pw ssh my-resource
# Interactively connect to a resource owned by another user
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 my-resource hostname
# Run the "hostname" command on your user workspace and exit
pw ssh workspace hostname
# Run as a ProxyCommand for SSH
ssh -i ~/.ssh/pwcli -o ProxyCommand="pw ssh --proxy-command %h" user@my-resource
ssh -i ~/.ssh/pwcli -o ProxyCommand="pw ssh --proxy-command %h" user@pw://Jake.Thayne/my-resource
ssh -i ~/.ssh/pwcli -o ProxyCommand="pw ssh --proxy-command %h" user@workspace
# Run as a ProxyCommand for SSH, with port forward
ssh -i ~/.ssh/pwcli -L 8080:localhost:80 -o ProxyCommand="pw ssh --proxy-command %h" user@my-resource
ssh -i ~/.ssh/pwcli -R 80:localhost:8000 -o ProxyCommand="pw ssh --proxy-command %h" user@workspace
# Run as a ProxyCommand for SCP
scp -i ~/.ssh/pwcli -O -o ProxyCommand="pw ssh --proxy-command %h" file.txt user@my-resource:/home/user/file.txt
scp -i ~/.ssh/pwcli -O -o ProxyCommand="pw ssh --proxy-command %h" file.txt user@workspace:/home/user/file.txt
-h, --help help for ssh
--keepalive int Interval in seconds between keepalive messages (0 to disable) (default 30)
--proxy-command Run as a proxy command for SSH or SCP
--context string The context to use. Overrides PW_CONTEXT environment variable and current context from config.
--platform-host string The Parallel Works ACTIVATE platform host to use. Will override any other platform host settings.
-v, --verbose Enable verbose logging