It’s very easy to generate a ssh key on Linux!
Execute the following command to generate a SSH key
$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/sample/.ssh/id\_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/sample/.ssh/id\_rsa. Your public key has been saved in /home/sample/.ssh/id\_rsa.pub. The key fingerprint is: xxxxxxxxxxxxxxxxxxxxxxxxxx sample@localhost.localdomain The key's randomart image is: +--[ RSA 2048]----+ | E. ..o | | . .. o | | o . . o | | . . = | | S ..o= | | ..=ooo | | .oo . | | . .. o | | o+o . .| +-----------------+
The public and private keys will be saved in ~/.ssh/id\_rsa (PRIVATE KEY) and ~/.ssh/id\_rsa.pub (PUBLIC KEY)
Copy the output from id\_rsa.pub, for example you can use cat/nano/vim:
$ cat /home/sample/.ssh/id\_rsa.pub ssh-rsa sampleeeeeeeeeeeee sample@localhost.localdomain
- Open cPanel
- Click on SSH Remote Access
- Then go to Manage SSH Keys
- Click on Import Key
- Type name for public key (For example: MyKey1)<
- Scroll down and paste the public key into “Paste the public key into the following text box:”
- Click Import
- Back to Manage Keys
- Click on Manage on your public key and then Authorize
$ ssh putty@servername -p4747
