11.9.3. Accessing a Specific Gear

As mentioned earlier, a secure shell environment connection is made to the application's primary gear by default. However, a specific gear can be accessed for debugging gear problems in a scalable application. The following instructions describe how to access a gear with the gear's ID and SSH URL.

Procedure 11.2. To Access a Specific Gear:

  1. Determine the gear's ID and SSH URL with the following command:
    $ rhc app show App_Name --gears

    Example 11.11. Viewing Application Gears

    $ rhc app show automobile --gears
    ID                       State   Cartridges          Size  SSH URL
    ------------------------ ------- ------------------- ----- ----------------------------------------------------------------------------
    51774b712587c83ddb00009d started php-5.4 haproxy-1.4 small 51774b712587c83ddb00009d@hybrid-automobile.example.com
    519b0fd02587c84b860002d8 started php-5.4 haproxy-1.4 small 519b0fd02587c84b860002d8@519b0fd02587c84b860002d8-automobile.example.com
    519b1018dbd93c85180001fc started php-5.4 haproxy-1.4 small 519b1018dbd93c85180001fc@519b1018dbd93c85180001fc-automobile.example.com
    519b06ebdbd93cd439000027 started postgresql-9.2      small 519b06ebdbd93cd439000027@519b06ebdbd93cd439000027-automobile.example.com
    
    In the example output the ID of the first scaling gear is 519b0fd02587c84b860002d8 and its SSH URL is 519b0fd02587c84b860002d8@519b0fd02587c84b860002d8-automobile.example.com.
  2. Open a secure shell environment to the desired gear with the gear's SSH URL:
    $ ssh 519b0fd02587c84b860002d8@519b0fd02587c84b860002d8-automobile.example.com