N
N
nak-alexey2021-01-04 22:12:53
linux
nak-alexey, 2021-01-04 22:12:53

SSH key authorization?

I generated a private and public key on the server, copied the public key to the 'authorized_keys' file on the client machine, but authentication, as usual, takes place with a password.

1: An empty password was specified during generation
2: Ssh server on CentOS 7
3: Selinux is disabled.

Well, where else to dig then? Why does not it work? Help me please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2021-01-04
@nak-alexey

I generated a private and public key on the server, copied the public key to the 'authorized_keys' file on the client machine, but authentication, as usual, takes place with a password.

Are you coming from the server to the client machine, or what? Because the public key is placed on the machine they enter.
To log in from the client to the server, generate a key pair on the client and write the public key to authorized_keys on the server.

K
ky0, 2021-01-04
@ky0

What does the connection show in verbose mode? Often the permissions on the file/directory ~/.sshare incorrect, so the key is not used.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question