Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > Dashboard Users Guide > Clouds > AWS Regions > EC2 SSH Keys > Actions > Create a New SSH Key by Importing an RSA Key Pair > Create an RSA Key Pair

Create an RSA Key Pair

Table of Contents

Objective

To create an RSA key pair that you can use to Create a New SSH Key by Importing an RSA Key Pair.

Prerequisites

  • SSH client that supports RSA key pair creation
  • Running Linux instance that you can SSH into

Steps

SSH into the running Linux instance. The example below is based off of an Ubuntu 10.04 instance.

In the terminal window, type the following linux command at the prompt:

# ssh-keygen

Provide a name that will be used for the key files that will be created.

Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): my-keypair

When asked to provide a passphrase, leave it blank and click Enter.  You do not want to use a passphrase.

Enter passphrase (empty for no passphrase): <ENTER>Enter same passphrase again: <ENTER>

 

Next, locate the created private and public key files.

# lltotal 120
drwx------  7 root root  4096 2011-12-15 00:03 ./
drwxr-xr-x 21 root root  4096 2011-12-14 23:58 ../
-rw-r--r--  1 root root  3463 2011-12-14 23:58 .bashrc
drwx------  2 root root  4096 2011-12-14 23:58 .cache/
drwxr-xr-x  2 root root  4096 2011-12-14 23:58 .chef/
drwxr-xr-x  4 root root  4096 2011-11-09 02:40 .gem/
-rw-r--r--  1 root root   181 2011-12-14 23:57 .gemrc
-rw-------  1 root root 56103 2011-12-14 23:58 .git_completion.sh
-rw-------  1 root root    74 2011-12-14 23:58 .gitconfig
-rw-------  1 root root    32 2011-12-14 23:57 .monit.id
-rw-------  1 root root  1675 2011-12-15 00:03 my-keypair-rw-r--r--  1 root root   404 2011-12-15 00:03 my-keypair.pub-rw-r--r--  1 root root   140 2010-04-23 09:45 .profile
drwxrwx---  2 root root  4096 2011-11-09 02:43 .rightscale/
drwx------  2 root root  4096 2011-12-14 23:58 .ssh/
-rw-------  1 root root   115 2011-12-14 23:58 .vimrc

 

View the files and save the contents of your RSA keypair.  For your records, you may want to copy and paste the value into a text file for archiving purposes.

  • my-keypair (private key)
  • my-keypair.pub (public key)
# view my-keypair

 

See also

You must to post a comment.
Last modified
13:23, 10 Jul 2014

Tags

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.