quite often this is due to improper ownership and / or rights of the .ssh and / or its contents.
fix affiliation:
$ sudo chown -R пользователь:группа /путь/к/каталогу/.ssh
where группа is the main group of the user. You can clarify it using:
$ id пользователь uid=номер(пользователь) gid=номер(группа) …
fix rights:
$ sudo chmod -R go= /путь/к/каталогу/.ssh
You should also make sure that you put the public part of the key ( id_rsa.pub or id_dsa.pub ) in the authorized_keys file, and that this file is located exactly in the .ssh in the home directory of the created user.
In general, in order to avoid the problems described above, it is more convenient to copy the public key using the ssh-copy-id program:
$ ssh-copy-id пользователь@сервер
ssh -vvvT user@host- connect to the machine that we cannot and get verbose-listing. It will show what keys ssh tries to transmit and what happens next. * Check that folders like .ssh and private keys inside have permissions strictly 700 - ssh does not connect without this. * Look at /var/log/auth.log - etki