flexx logoflexx docs

SSH Access

SSH into your remote machines through the flexx relay. Auto-configured ProxyCommand, works behind NAT and firewalls.

Quick start

After registering a remote with flexx remote init, SSH access is automatically configured:

ssh flexx-my-server

The flexx- prefix is added to your remote's name. If your machine is named dev-laptop:

ssh flexx-dev-laptop

How it works

When you run flexx remote init or flexx setup, flexx adds this to your ~/.ssh/config:

Host flexx-*
  ProxyCommand flexx proxy %h %p
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null

When you ssh flexx-myserver:

  1. SSH invokes flexx proxy flexx-myserver 22
  2. flexx proxy opens a WebSocket to the relay at /v1/ssh/<remote-id>
  3. The relay forwards the SSH traffic to the daemon on your remote machine
  4. The daemon's built-in SSH server handles the session

Finding your remote name

flexx remote list
  Remotes

  NAME                 TYPE         STATUS     CAPABILITIES
  dev-laptop           machine      online     shell, filesystem, search
  gpu-server           machine      offline    -

You can also use flexx ssh <remote-name> to display the connection command:

flexx ssh dev-laptop

Troubleshooting

Connection refused

Make sure the daemon is running on the remote machine:

flexx status

If it's stopped, start it:

flexx connect

Permission denied

Check that you're authenticated:

flexx auth whoami

Remote not found

List available remotes and verify the name:

flexx remote list

On this page