Could you try this:
Be carefull the ssh-copy-id does not work you will need to use the -f option.
And then it should work.
Tested and approuved:
[alberta@localhost .ssh]$ ssh -F config_bamboo cpu002
alberta@cpu002's password:
Killed by signal 2.
[alberta@localhost .ssh]$ ssh-copy-id login1.bamboo.hpc.unige.ch -f
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/alberta/.ssh/id_rsa.pub"
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'login1.bamboo.hpc.unige.ch'"
and check to make sure that only the key(s) you wanted were added.
[alberta@localhost .ssh]$ ssh -F config_bamboo cpu002
Last login: Wed Jul 31 01:39:11 2024 from login1.bamboo
Installed: Fri May 31 14:59:01 CEST 2024
(bamboo)-[alberta@cpu002 ~]$