1. Generated keys on my computer (I have a Windows - I tried it with the usual ssh-keygen and putty)
  2. Added a public key on the server to ~ / .ssh / authorized_keys
  3. I ssh root@myhost -i ~/.ssh/id_rsa trying to connect: ssh root@myhost -i ~/.ssh/id_rsa and at this step I will be asked for the user's password ... It comes with a password, but why is this happening? I want to enter without a password !!! Only by file.

PubkeyAuthentication yes installed. I have CentOS 7 in a virtual machine on the same computer (I want to connect to it).

Reported as a duplicate by aleksandr barakin linux Dec 13 '18 at 9:09 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • on server: $ chmod -R go= ~/.ssh; chmod go=~ $ chmod -R go= ~/.ssh; chmod go=~ . generally duplicate, for example, this issue . - aleksandr barakin
  • @alexanderbarakin what a strange team? O_o What is this go ? I do not think that the problem is in the file permissions. I did the instructions and put the .ssh folder on the right 700, and the authorised_keys 600 file was the PECHAPPER
  • @alexanderbarakin why did you do it? This is not a duplicate. Open the question. I have another problem !!! - PECHAIR
  • @alexanderbarakin I tried to apply your commands - it did not help! Please open a question or I will create duplicates! I need to solve this problem, but there is no solution in that topic !!! This is a completely different problem !!! - PECHAIR
  • one
    1. I added more duplicates. 2. $ ls -ld ~ ~/.ssh ~/.ssh/authorized_keys output $ ls -ld ~ ~/.ssh ~/.ssh/authorized_keys . 3. if the permissions are ok, give the output $ ssh -vvv ... and what sshd writes to the server in the log when trying to execute this command. - aleksandr barakin

0