O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running a command in the application's SSH session using rhc

In this recipe, you will learn how to view the gear directory listing without performing SSH into the server using rhc.

Getting ready

To step through this recipe, you will need rhc installed on your machine. Also, we will use the OpenShift application created in the Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

To run the ls command without performing SSH into the application server, you should run the following command:

$ rhc app-ssh --app myapp --command ls

The rhc ssh command is a short hand for rhc app-ssh. Both these commands allow you to SSH into an application gear.

How it works…

The rhc app-ssh command internally uses the SSH command-line ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required