Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

SSH into the application gear using rhc


In this recipe, you will learn how to use rhc to SSH into the application gear.

Getting ready

In order to complete this recipe, you will need rhc installed on your machine. Also, you will need to make use of the OpenShift application created in The Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

To SSH into the application gear, open a new command-line terminal and run the following command:

$ rhc ssh --app myapp

The --app option is not required if you are running the command within the application Git repository.

How it works…

Every OpenShift application gear acts and behaves like a virtual server that you can access using SSH. A gear is assigned a unique user ID and is associated with a SELinux context. When you run the rhc ssh command, a secure communication channel is opened between the node hosting the gear and the local machine where you are presented with a limited shell within the environment, as shown in...