anchor.diff:  
   This page assumes you are using [cf CLI v6.15.0](https://github.com/cloudfoundry/cli/releases) or later. 
   
  -This topic describes how to utilize the SSH capacity of an app to gain direct command line access to your Cloud Foundry deployed service instance. For example, you may need access to your database to execute raw SQL commands to edit the schema, import and export data, or debug application data issues. 
  +This topic describes how to gain direct command line access to your Cloud Foundry deployed service instance. For example, you may need access to your database to execute raw SQL commands to edit the schema, import and export data, or debug application data issues. 
   
  -To access services with SSH, you deploy a host app and leverage its SSH and port forwarding features to communicate with the service instance through the app container. The technique outlined below works with any TCP service, such as MySQL or Redis. 
  +To establish direct command line access to a service, you deploy a host app and utilize its SSH and port forwarding features to communicate with the service instance through the app container. The technique outlined below works with any TCP service, such as MySQL or Redis. 
   
   ##<a id="create-instance"></a>Creating a Service Instance##
   
   In your terminal window, login to your Cloud Foundry deployment with `cf login`. 
   
  -1. List the marketplace services installed as product tiles on your PCF Ops Manager. See <a href="../../customizing/add-delete.html">Adding and Deleting Products</a> if you need to add the service as a tile. In this example, we create a p-mysql service instance.
  +1. <%= vars.ssh_marketplace_step %>
   <pre class="terminal">$ cf marketplace
  -p-mysql	100mb	MySQL databases on demand
  +<%=vars.ssh_marketplace_output %>
   </pre>
   1. Create your service instance. As part of the `create-service` command, indicate the service name, the service plan, and the name you choose for your service instance.
  -<pre class="terminal">$ cf create-service p-mysql 100mb MY-DB</pre>
  +<pre class="terminal">$ cf create-service <%=vars.ssh_service %> <%=vars.ssh_service_plan %> MY-DB  </pre>
   
   ##<a id="push-app"></a>Pushing Your Host App##
   
  
positive.code: 1. Retrieve your new service key.
  <pre class="terminal">$ cf service-key MY-DB EXTERNAL-ACCESS-KEY
  Getting key EXTERNAL-ACCESS-KEY for service instance MY-DB as user<span>@</span>pivotal.io...
  {
   "hostname": "us-cdbr-iron-east-01.p-mysql.net",
   "jdbcUrl": "jdbc:mysql://us-cdbr-iron-east-03.p-mysql.net/ad\_b2fca6t49704585d?user=b5136e448be920\u0026password=231f435o05",
   "name": "ad\_b2fca6t49704585d",
   "password": "231f435o05",
   "port": "3306",
   "uri": "mysql://b5136e448be920:231f435o05<span>@</span>us-cdbr-iron-east-03.p-mysql.net:3306/ad\_b2fca6t49704585d?reconnect=true",
   "username": "b5136e448be920"
  }
  </pre>
  
  ##<a id="ssh-tunnel"></a>Configuring Your SSH Tunnel 
  
  Configure an SSH tunnel to your service instance using `cf ssh APP-NAME`. Tailor the example command below with information from your service key.
  <pre class="terminal">$ cf ssh -N -L 63306:us-cdbr-iron-east-03.p-mysql.net:3306 YOUR-HOST-APP</pre>
  
    * Replace `us-cdbr-iron-east-03.p-mysql.net` with the address provided under `hostname` in the service key retrieved above.
    * Replace `3306` with the port provided under `port` above.
    * Use any available local port for port forwarding. For example, `63306`.
    * `-N` tells `cf ssh` not to execute a remote command.
  
negative.code: <p class="note"><strong>Note</strong>: Because the SSH tunnel may timeout, Pivotal recommends that you run <code>cf ssh</code> in the foreground and restart it if it exits. </p>
  
  ##<a id="access-service"></a> Accessing Your Service Instance##
  To establish direct command-line access to your service instance, use the relevant command line tool for that service. This example uses the MySQL command line client to access the <%= vars.ssh_service %> service instance. 
  
  <pre class="terminal">$ mysql -u <%= vars.ssh_service_user %> -h 0 -p -D <%= vars.ssh_service_db %> -P 63306</pre>
    * Replace `<%= vars.ssh_service_user %>` with the username provided under `username` in your service key.
    * `-h 0` indicates to `mysql` to connect to your local machine.
    * `-p` indicates to `mysql` to prompt for a password. When prompted, use the password provided under `password` in your service key.
    * Replace `<%= vars.ssh_service_db %>` with the database name provided under `name` in your service key.
    * `-P 63306` indicates to `mysql` to connect on port 63306.