SSH Key Registration and Management

SSH Key Registration and Management

4 min read

Purpose #

This procedure enables secure login to a host in the cloud using SSH public key authentication by performing the following steps: create public and private keysregister the public key in the cloudverify login with the private key.

About Public Keys and Private Keys #

A public key (Public Key) and a private key (Private Key) are a key pair used for encryption and authentication. The public key can be shared, while the private key must be managed securely by the owner alone.

Characteristics of Public Key (Public Key) #

  • Can be shared:There is no problem distributing it to anyone.
  • Primary uses:
    • Encryption (data encrypted with a public key can only be decrypted with the corresponding private key)
    • Signature verification (content signed with a private key can be verified with the public key)

Characteristics of Private Key (Private Key) #

  • Absolutely confidential:Do not share with others. If it is leaked, it can lead to unauthorized access and other issues.
  • Primary uses:
    • Decryption (decryption of data encrypted with a public key)
    • Signing (creation of digital signatures)

Creating Public and Private Keys (Tera Term) #

Here, we will create a public key and a private key using Tera Term’s key generation function. A bit length of 4096 is recommended.

Creation Steps #

1
Start Tera Term.
2
If a new connection popup appears after startup, close it by clicking [Cancel] or [×].
New connection popup immediately after Tera Term startup
Figure 1: Close the popup that appears at startup
3
Click [Setup(S)] from the menu at the top of the screen.
Tera Term setup menu
Figure 2: Open [Setup(S)]
4
Click [SSH Key Generation(N)] (this is where you generate the key pair).
SSH key generation menu
Figure 3: Open SSH key generation
5
On the key generation screen, set the key type to RSA and the bit length to 4096, then click [Generate(G)] in the upper right.
RSA 4096bit key generation screen
Figure 4: Generate key with RSA (4096bit)
6
After key generation, if a passphrase input prompt appears for private key protection, set it.

Recommended: 10 characters or more, including uppercase and lowercase letters, numbers, and symbols.
※Creation is possible without setting a passphrase, but it is advisable to set one.

Private key passphrase setting screen
Figure 5: Set a passphrase for the private key
7
Click the save buttons for public key and private key respectively on the screen to save the key files.

※If save format options (such as bcrypt KDF) are displayed on the screen, select them according to the guidance and operational rules.

※Save the key pair (public key and private key) as a set created from the same generation operation.

8
In Explorer, verify that the public key and private key have been saved (for example, private key id_rsa / public key id_rsa_pub).
Screen showing that public and private key files have been saved
Figure 6: Verify that the two key files have been saved

Security Precautions #

  • Never share the private key (for example, id_rsa).
  • Avoid email attachments, chat pasting, and shared folder storage; keep it in a location with restricted access.
  • If you set a passphrase, manage it safely so you do not forget it.

Register Public Key in Cloud #

The created key is not yet linked to the cloud (host), so it cannot be used as is. Here, we will register the public key in the cloud and apply it to the host.

Registration Steps #

1
Log in to cloud and navigate to [Security] from the menu.
Cloud screen security menu
Figure 7: Open [Security]
2
When displayed, navigate to the [SSH Key] section.
Screen for opening SSH key section
Figure 8: Open [SSH Key]
3
On the SSH Key list screen, click [Add New SSH Key].
Screen for adding a new SSH key
Figure 9: Add a new SSH key
4
When a popup appears, enter the following and click Submit.
  • SSH Key Name (optional)
  • Full text of the public key (open the public key file id_rsa_pub, copy all its contents, and paste it)

※If format instructions (such as OpenSSH format) appear on the screen, follow the instructions for input.

Popup screen for registering public key
Figure 10: Register SSH key (public key)
5
Once registration is complete, navigate to the host you want to set up and click [Reset SSH Keys].
Screen to click Reset SSH Keys
Figure 11: Apply public key to host (Reset SSH Keys)
6
When a popup appears, select the SSH Key name you set earlier from the dropdown menu and click Submit.

It may take a few minutes for the change to take effect. Once the status is On, the setup is complete.

Screen for selecting and applying SSH key
Figure 12: Select SSH key and confirm application is complete

Login with Private Key (Operation Verification) #

Once the public key has been linked, finally verify that you can log in with the private key.

Login Steps #

1
Start Tera Term, enter the IP address in the host field and click OK. Select SSH for the service.
Screen to start SSH connection to host in Tera Term
Figure 13: Start SSH connection to host
2
On the authentication screen, check [Use RSA/DSA/ECDSA/ED25519 key] for the authentication method. A field to specify the private key file will appear, so click the browse button.
Screen to select key authentication and specify private key file
Figure 14: Select key authentication and specify private key file
3
Select and open the private key file (for example, id_rsa).
Screen for selecting private key file
Figure 15: Select private key file
4
Once you have linked the private key, enter the user name and passphrase.

※Enter the passphrase you set when creating the key. After entering it, click OK.

Authentication screen to enter user name and passphrase
Figure 16: Authenticate with user name and passphrase
5
If you log in without any issues, the setup is complete.
Updated on 2026年6月9日

What are your feelings

  • Happy
  • Normal
  • Sad