TUT HPC Cluster Wiki

TUT HPC Cluster Wiki: en / SSHClient / LinuxMac

[English|Japanese]

Using the SSH Client (on Linux & Mac OS X)

Setting Up

A Linux or Mac OS X user needs to connect to a server using the ssh command. The ssh command is usually preinstalled on the OS. You can check if the ssh command is installed on your machine using the following command.

% which ssh

If the ssh command is installed, the following message is displayed (message content may vary depending on your environment).

% which ssh
/usr/bin/ssh

If the ssh command is not installed, the following message is displayed (message content may vary depending on your environment).

% which ssh
ssh not found

If the ssh command is not installed, install the command using the package manager of the respective OS.

When using Debian or Ubuntu
% apt-get install openssh-client

When using Fedora or CentOS
% yum install openssh-clients

Connecting to the Server

Open the terminal window, and type as follows to connect to the development server of the respective cluster system.

% ssh <USER>@<SERVER>

Replace <USER> and <SERVER> with your own user name and the target server, respectively, to connect.

To execute the GUI application, type as follows.

% ssh -X <USER>@<SERVER>

Creating a Public Key

You can create a public key and private key pair using the ssh-keygen command.

To create a key, you are prompted to input the following information items.

  1. The directory in which you would like to store the key.
  2. The pass phrase to set to the key.
  3. The same pass phrase for confirmation.

An example of the ssh-keygen command specification is as follows.

% ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tutuser/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/tutuser/.ssh/id_rsa.
Your public key has been saved in /home/tutuser/.ssh/id_rsa.pub.
The key fingerprint is:
8f:3c:39:7c:1a:b0:16:22:97:9b:1d:a2:64:df:e2:10 tutuser@tutuser-VirtualBox
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|     .           |
|  E = + S        |
| o * B B +       |
|  o = = O o      |
|   o o   *       |
|    .   .        |
+-----------------+

The key is stored in the following directories by default.