HDP with PUTTY (SSH) Client Setup - Week 01
OBJECTIVES
- Connect to HDP Sandbox instance using SSH client: terminal (mac and linux) or putty (windows)
PRE-REQUISITES
- You have Downloaded and Installed Hortonworks Sandbox
- Allow yourself around one hour to complete this tutorial
- For windows users, to run linux terminal commands in these tutorials, download and install PUTTY client using these PUTTY installation video or this PUTTY installation documentation.
Let's get Started
Secure Shell (SSH) allows you to remotely perform operations on your Liux-based HDP cluster using a command-line interface.
SSH establishes an encrypted connection to the cluster head node and provides a command line that you use to type in commands. Commands are then executed directly on the server.
EXECUTE TERMINAL COMMANDS
When working with HDP, there would be use cases where it would be important to access the Sandbox through a terminal SSH client.
Secure Shell (SSH) Method:
After HDP Sandbox is installed and you are brought to the welcome page. It would look something like this.
Original Image Source
Take note of the ip, port, username and password. We'll need them below.
Steps to follow
Open your terminal (mac and linux) or putty (windows). Type the following command to access the Sandbox through SSH:
# Usage: ssh <username>@<hostname> -p <port>;
# Example:ssh [email protected] -p 2222;
Follow the example above. You would be prompted your password.
Type in the default password hadoop
After that, you would be taken into the Sandbox through SSH.
Once you are successfully logged into the terminal, you can fire off commands to the HDP environment.
Example: To list all the files in HDFS, do:
# Example:ssh root@hadoop fs -ls /
This command will list all the files in the HDFS root directory.
For exhaustive list of commands using SSH terminal, read here. This topic would be covered in depth in a separate lesson.
Links and Resources
0 comments