B
B
BlastPit2019-02-07 18:47:40
linux
BlastPit, 2019-02-07 18:47:40

Why does the machine on which the ssh key was created not allow me to log into it?

Under a certain user, I generated a key pair (ssh-keygen) on machine 1, brought the public key to machine 2 (autorized_keys), and successfully connected to it. However, I cannot use this key to connect as the same user to the machine where the key was created (also the public key was added to the authorized_key). The question is, how so?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitsliputsli, 2019-02-07
@Vitsliputsli

What about the private key? For good on the other machine, you need to create a new pair of keys.

S
Shoolcs, 2019-02-07
@noob1

Perhaps the problem is in the name of the file "authorized_keys" , or the rights to the file and directory "./ssh" .

B
BlastPit, 2019-02-10
@BlastPit

Thanks everyone. If you use the ssh-keygen command with the -t -C -b keys, then these keys can be used universally, that is, they are suitable both for the creator's machine and for all others where the public key is registered in the auhorized_keys file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question