Pantheon Helpdesk

Welcome, Guest Login

Support Center

SSH Tunneling

Last Updated: Feb 07, 2013 01:28PM PST

In addition to the other methods for accessing your Pantheon services, you are able to open SSH tunnels to connect to your services. This can be helpful if you want to use a local MySQL or Redis client to connect to the Pantheon-hosted service, and need to do so over an encrypted channel.

In order to open an SSH tunnel, you need a few key pieces of information:

  1. Your site's UUID, which can be found in your dashboard URL, git connection string, etc.
  2. The environment you want to connect to (dev, test, or live)
  3. The service you want to connect to (dbserver or cacheserver)
  4. The port your service runs on, which can be found using the "Connect" option for that environment's database

You can then combine these like so:

# Replace these exports with real values from your site
export $SITE="your-site-uuid"
export $ENV="dev" 
export $SERVICE="dbserver"
export $PORT="port-number"

# Now open the tunnel
ssh -f -N -L $PORT:localhost:$PORT -p 2222 $ENV.$SITE@$SERVICE.$ENV.$SITE.drush.in

# Now use it with your local mysql client
mysql -u pantheon -h 127.0.0.1 -p -P $PORT

Contact Us

helpdesk@getpantheon.com
http://assets3.desk.com/r1046ffeaa2233e531563a32d7edef6677d8a78b5/javascripts/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/portal/articles/autocomplete