# Creating SSH key-pair

**URL:** <https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138>\
**Category:** Uncategorized\
**Created:** [20 September 2023 11:50 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138 "2023-09-20T11:50:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dutta\_Dutta](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dutta\_Dutta](https://cms-helpdesk.ncas.ac.uk/u/Dutta_Dutta)\
**Post date:** [20 September 2023 11:50 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/1 "2023-09-20T11:50:02Z")

</div>

Dear CMS team,

I am trying to create an SSH key-pair (id\_rsa) following the steps outlined in [https://source.geography.bristol.ac.uk/wiki/UsingSSH#Using\_SSH\_Key-Pairs](https://source.geography.bristol.ac.uk/wiki/UsingSSH#Using_SSH_Key-Pairs) for submitting the Unified Model from PUMA to BEAR HPC in the University of Birmingham. However, I had an issue while executing the following command:

_scp ~/.ssh/id\_rsa.pub [duttadz@bluebear.bham.ac.uk](mailto:duttadz@bluebear.bham.ac.uk):.ssh/from-host.pub_

The error message I received:

_Permission denied (publickey)._  
_lost connection_

I reached out to the BEAR support team, and they suggested manually adding the key to the .ssh folder on BEAR.

After copy-pasting the public key into BEAR, I tried to log in using _“ssh [duttadz@bluebear.bham.ac.uk](mailto:duttadz@bluebear.bham.ac.uk)”_ from PUMA. However, I received an “_Authentication failed_” message.

Is there anything specific that I might have missed?

Please let me know.

Thank you,  
Deepashree

---

<div class="post-metadata">

**Author:** ![RosalynHatcher](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/rosalynhatcher/32/11_2.png) [@RosalynHatcher](https://cms-helpdesk.ncas.ac.uk/u/RosalynHatcher)\
**Post date:** [20 September 2023 12:25 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/2 "2023-09-20T12:25:19Z")

</div>

Hi Deepashree,

You need to tell ssh which key to use; try:

`ssh -i ~/.ssh/id_rsa duttadz@bluebear.bham.ac.uk`

Cheers,  
Ros.

---

<div class="post-metadata">

**Author:** ![Dutta\_Dutta](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dutta\_Dutta](https://cms-helpdesk.ncas.ac.uk/u/Dutta_Dutta)\
**Post date:** [20 September 2023 13:00 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/3 "2023-09-20T13:00:01Z")

</div>

Hi Ros,

Thank you so much.  
I’m relatively new to these supercomputers and I mistakenly deleted the keys in my laptop that were linked to my PUMA account, instead of deleting the keys on BEAR. I was trying to start over the whole process in an attempt to pair PUMA and BEAR.  
I’m so sorry for the inconvenience. Is there a way to recover those keys so that I can access my PUMA account?

Please let me know.  
Thank you,  
Deepashree

---

<div class="post-metadata">

**Author:** ![RosalynHatcher](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/rosalynhatcher/32/11_2.png) [@RosalynHatcher](https://cms-helpdesk.ncas.ac.uk/u/RosalynHatcher)\
**Post date:** [20 September 2023 13:17 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/4 "2023-09-20T13:17:08Z")

</div>

Hi Deepashree,

If you backup your laptop you should be able to recover the PUMA access keys from there. Otherwise you will need to regenerate them and send the new .pub to Andy Heaps as per the instructions he sent you when you first got access to PUMA.

Regards,  
Ros.

---

<div class="post-metadata">

**Author:** ![Dutta\_Dutta](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dutta\_Dutta](https://cms-helpdesk.ncas.ac.uk/u/Dutta_Dutta)\
**Post date:** [21 September 2023 11:41 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/5 "2023-09-21T11:41:57Z")

</div>

Hi Ros,

Thank you so much.

I tried the following as you suggested:

`ssh -i ~/.ssh/id_rsa duttadz@bluebear.bham.ac.uk`

But I still received “Authentication failed” message.  
Please let me know what I should do.

Thank you.  
Deepashree

---

<div class="post-metadata">

**Author:** ![RosalynHatcher](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/rosalynhatcher/32/11_2.png) [@RosalynHatcher](https://cms-helpdesk.ncas.ac.uk/u/RosalynHatcher)\
**Post date:** [21 September 2023 12:04 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/6 "2023-09-21T12:04:22Z")

</div>

Hi Deepashree,

You will need to contact BEAR support. The rejection message is coming from their machine. All I can say is that everything looks ok with your ssh keys on PUMA.

Regards,  
Ros.

---

<div class="post-metadata">

**Author:** ![andyheaps](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/andyheaps/32/259_2.png) [@andyheaps](https://cms-helpdesk.ncas.ac.uk/u/andyheaps)\
**Post date:** [21 September 2023 12:06 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/7 "2023-09-21T12:06:03Z")

</div>

Hi Deepashree,

You’ll need to contact the bluebear help desk for this as the issue lies with their system and not with PUMA. The “Authentication failed” message comes from the bluebear system when you try to login to it. Usually you would copy your PUMA ~/.ssh/id\_rsa.pub file to the bluebear ~/.ssh/authorized\_keys file but the details will need to be provided by the bluebear support team.

Cheers  
Andy

---

<div class="post-metadata">

**Author:** ![Dutta\_Dutta](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dutta\_Dutta](https://cms-helpdesk.ncas.ac.uk/u/Dutta_Dutta)\
**Post date:** [21 September 2023 12:34 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/8 "2023-09-21T12:34:28Z")

</div>

Hi Andy,

Thank you so much for the clarification.  
I copy-pasted the .pub file to bluebear ~/.ssh/authorized\_keys, but I keep receiving the same error.  
I’ll contact the bluebear support team again.

Deepashree

---

<div class="post-metadata">

**Author:** ![Dutta\_Dutta](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dutta\_Dutta](https://cms-helpdesk.ncas.ac.uk/u/Dutta_Dutta)\
**Post date:** [21 September 2023 12:36 UTC](https://cms-helpdesk.ncas.ac.uk/t/creating-ssh-key-pair/1138/9 "2023-09-21T12:36:29Z")

</div>

Thanks so much Ros.
