Win10+git+copssh builds git server public key login always reports to permission denied

problem solved
solution:

delete the root user created when installing copssh (customizable), then recreate an account with the same name, then delete the root account in copssh and add it again. Finally, be sure to restart the service! Note: the re-added root account must be set to belong to administrator. Otherwise, the clone project will indicate that there is no relevant permission!

  1. problem description
    win10 Professional Edition build git server through git + copssh4.1.0. The password login is normal, and the public key login appears permission denied.
ssh-keygen -t rsa -C "youremail@example.com"copssh \home\root\.ssh\ (root) authorized_keyscopssh keyauthorized_keys
Nov.14,2021

  • the login server performs modifications under the root directory. Ssh owner and owner group:

    chown -R your_user:your_user .ssh
  • modify permissions, give .ssh 700, authorized_keys 600th permissions

    chmod 700 .ssh
    chmod 600 .ssh/authorized_keys

solution:

delete the root user created when installing copssh (customizable), then recreate an account with the same name, then delete the root account in copssh and add it again. Finally, be sure to restart the service! Note: the re-added root account must be set to belong to administrator. Otherwise, the clone project will indicate that there is no relevant permission!

Menu