Score:0

ssh: cannot use pubkeyfile to connect to server without password

cn flag

This is my situation. I have setup the admin pc to be able to remote access a cluster of pc via ssh without password using keyfile, using the following steps

  1. Generate the key, call it access

    ssh-keygen

I have gotten 2 files from there access(private key) and access.pub (public key)

  1. Then I copy the key to my cluster

ssh-copy-id -i ~/.ssh/access.pub xxx@address

  1. Then I try to login with the usual ssh login

ssh xxx@address

Steps 2 and 3 is repeated for all PCs in cluster and I can access all the pc without password by ssh

Unfortunately one of the pc has to be reformatted and I try to use the same steps again but I could not access the system again. I wonder what is wrong

I have tried to use ssh -vvv to find out what is wrong. The ssh debug message always seem to always give message type 51(which I think is wrong authentication or something along the line).

The authentication process seem to proceed to search for the key eg id_dsa, id_ed2259 etc (I guess in my client pc). This is what I feel like some last ditch attempt to authenticate by key

I wonder what is wrong with my authentication (the first time round). It did proceed to send the public key, I can view the number in the debug printout RSA sha256:xx...............xx agent

The key also appears on the target authorized_key and the sshd_config is being set to PubkeyAuthentication yes 'AuthorizedKeysFile ~/.ssh/authorized_keys ....'

I wonder what is wrong? What area have I left out. Could someone provide a direction on where I could look at or possibly missed out?

Thanks

muru avatar
us flag
What do the server's ssh logs say?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.