The -y option will read a private SSH key file and prints an SSH public key to stdout. The public key part is redirected to the file with the same name as the private key but with the.pub file extension. If the key has a password set, the password will be required to generate the public key. 6) Upload private and public keys on the device, from which you wish to use ssh commands with RSA authentication 7) Import both keys for the user: /user ssh-keys private import user=remote private-key-file=mykey public-key-file=mykey.pub passphrase='.
HostMonster Web Hosting Help
Using a Public/Private key to authenticate when logging into SSH can provide added convenience or added security. The Public/Private key can be used in place of a password so that no username/password is required to connect to the server via SSH. Instead the unique public and private key provide the secure authentication. It is advised that the key uses a different password from your cPanel password.Generating the Key
- Login to your HostMonster Control Panel
- Choose SSH / Shell Access, in the Security section.
- Click Manage SSH Keys
- Choose to Generate a new Key
- Enter a new Key password.
- Choose DSA or RSA for the type.
<=' span='> It is recommend that you choose RSA.='> - Choose a Key size, it is recommend to use 2048 or higher.
- Click Generate Key
- Click the Go Back button.
Ssh Public Key Example
Authorize the Key
Authorizing the key will add the public key to the authorized_keys file.- Click Manage Authorization
- Click the Authorize button for your newly created key.
- Click Go Back to return to the main page.
Private Key
The private key needs to be stored on your local computer.- To the right of your private key, click View/Download.
- Click the Download Key button to download the private key.
- If on Linux or Mac OS copy the id_dsa file to your ~/.ssh folder.
- On Windows you will want to move it some place safe.
Using your new key
Windows
For Windows please see Using SSH on Windows (PuTTY)Linux or Mac OS
- Open your Terminal
- Enter the following command
- If you created a passphrase you might see something like the following
ssh username@IP
Enter passphrase for key '~/.ssh/id_dsa':
Knowledgebase Article 181,704 views bookmark tags: dedicatedssh
Recommended Help Content
Related Help Content
Using a Public/Private key to authenticate when logging into SSH can provide added convenience or added security. The Public/Private key can be used in place of a password so that no username/password is required to connect to the server via SSH. Instead, the unique public and private keys provide secure authentication. It is advised that the key uses a different password from your cPanel password.Ssh Private Key And Public Key Definition
Generating the Key
- Login to your Bluehost Control Panel
- Choose SSH / Shell Access, in the Security section.
- Click Manage SSH Keys
- Choose to Generate a new Key
- Enter a new Key password.
- Choose DSA or RSA for the type.
It is recommended that you choose RSA. - Choose a Key size. It is recommended to use 2048 or higher.
- Click Generate Key
- Click the Go Back button.
Authorize the Key
Authorizing the key will add the public key to the authorized_keys file.- Click Manage Authorization.
- Click the Authorize button for your newly created key.
- Click Go Back to return to the main page.
Private Key
The private key needs to be stored on your local computer.- To the right of your private key, click View/Download.
- Click the Download Key button to download the private key.
- If on Linux or Mac OS copy the id_dsa file to your ~/.ssh folder.
- On Windows, you will want to move it someplace safe.
Using your new key
Windows
For Windows, please see Using SSH on Windows (PuTTY).Linux or Mac OS
ssh username@IP
- Open your Terminal
- Enter the following command
- If you created a passphrase you might see something like the following
Enter passphrase for key '~/.ssh/id_dsa':