Skip to content
Switch branches/tags
Go to file


Failed to load latest commit information.
Latest commit message
Commit time

Cloud Foundry CLI Service Connection Plugin CircleCI Code Climate

This plugin makes it easy to connect to your databases or other Cloud Foundry service instances from your local machine. This condenses the steps listed in Accessing Services with SSH to a single command.

demo screencast

Requires Diego architecture with SSH enabled.


Currently supports (most) service brokers for the following:

Local installation

  1. Install the Cloud Foundry CLI v6.15.0 or later.

  2. Install this plugin, using the appropriate binary URL from the Releases page.

    cf install-plugin <binary_url>
    # will be of the format
  3. Install the CLI corresponding to your service type (see above).


  • app_name is the name of the app in your space you want to tunnel through.
  • service_instance_name is the service instance you wish to connect to.
$ cf target --organization <org> --space <space>
$ cf connect-to-service <app_name> <service_instance_name>
Finding the service instance details...
Setting up SSH tunnel...

If you get an error such as "connection refused", "error opening SSH connection", or "psql: could not connect to server: Connection refused" this is usually caused by being on a network that blocks the SSH port that this tool is trying to use. Try using a different network, or consider asking your network administrator to unblock the port (typically 22 and/or 2222).

Manual client connection

If you're using a non-default client (such as a GUI), run with the -no-client option to set up your client connection on your own.