For too long, I have not worked on the server, now the memory is not being returned, there is already authorization by key for root and for another user, but there is a need to create another and popular Server refused our key.

  1. I created a private and public key in puttygen (rsa), upload the file to my user's pub directory (I also looked at how it was done for previous users) /var/www/%user%/data/.sh (isp)
  2. I execute chown from the root: -R% user%: users / var / www /% user% / data /
  3. I put on the .ssh right 700.
  4. I execute the ssh-keygen -i -f /var/www/%user%/data/.sh/key.pub >> /var/www/%user%/data/.sh/authorized_keys command
  5. I put on authorized_keys rights 600. I see it now deleted the old logs I put in the sshd config LogLevel DEBUG, I restarted sshd and the logs are generally empty. How to make this authorization?
  • one
    Where did /var/www/%user% come from? Usually the home directory is /home/%user% - Pavel Mayorov
  • I write (isp) control panel, it builds a hierarchy like that. home i have an empty folder in general - STC
  • one
    The .ssh must be in the user's home directory, otherwise it’s all useless. make sure that this is true. - etki
  • @STC: ISPManager builds a hierarchy for sites, and in this case you should be interested in the user's home directory, not the directory with the site. - MANKK

2 answers 2

/var/www/%user%/data/.sh/key.pub

Maybe ".ssh"?

ssh-keygen -i -f

Try as user %user% , for example, sudo -u %user%

  • These commands are performed - STC
  • Try to write more detailed answers. Explain what is the basis of your statement? - Nicolas Chabanovsky

In the / etc / ssh / sshd_config config, the AllowUsers setting did not include a new user, besides, there are sometimes problems with setting UsePAM yes, you can switch to no. The ISP Manager builds the hierarchy for users, and if it’s going to the site, it connects it to the user (@ MAN69K) Whoever is dealing with the panel, it makes no sense to go to home, since their home directory is / var / www / user / data /.

  • The home directory is what is specified in passwd. And ISPmanager for users creates a home directory in / home. - MANKK