Назад | Перейти на главную страницу

Как мне создать пользователя, который будет входить в систему по ssh с аутентификацией только по ключу?

Я пытаюсь настроить нового пользователя, который сможет входить в систему только с ключом. Кроме того, мне нужно изменить его домашний каталог на / var / www / website. Вот шаги, которые я сделал, и результат

  1. создал пользователя с useradd mark
  2. сгенерировал ключ на машине win с помощью puttygen (ssh-2 rsa), добавил ключевую парольную фразу, сохранил закрытый ключ в файл .ppk.
  3. Открытый ключ скопирован в файл authorized_keys сервера. Он копируется в одну строку (я обнаружил, что копирование в несколько строк может вызвать проблемы)

На сервере разрешена только регистрация с ключом. Ошибка, которую я получаю, когда пытаюсь подключиться к новому пользователю и новому ключу через winscp:

No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic).
Server refused our key.
Authentication failed.

кто я; root

ls -ld / home / mark /home/mark/.ssh /home/mark/.ssh/authorized_keys;

drwxrwxrwx 3 mark mark 4096 Nov 19 23:39 /home/mark drwxrwxrwx 2 mark mark 4096 Nov 19 23:41 /home/mark/.ssh -rwxrwxrwx 1 mark mark 401 Nov 20 00:13 /home/mark/.ssh/authorized_keys

полный стек журнала за одну попытку Nov 20 16:33:15 HOSTNAME sshd[12419]: debug1: userauth-request for user mark service ssh-connection method publickey Nov 20 16:33:15 HOSTNAME sshd[12419]: debug1: attempt 1 failures 1 Nov 20 16:33:15 HOSTNAME sshd[12419]: debug2: input_userauth_request: try method publickey Nov 20 16:33:15 HOSTNAME sshd[12419]: debug1: test whether pkalg/pkblob are acceptable Nov 20 16:33:15 HOSTNAME sshd[12419]: debug3: mm_key_allowed entering Nov 20 16:33:15 HOSTNAME sshd[12419]: debug3: mm_request_send entering: type 21 Nov 20 16:33:15 HOSTNAME sshd[12419]: debug3: mm_key_allowed: waiting for MONITOR_ANS_KEYALLOWED Nov 20 16:33:15 HOSTNAME sshd[12419]: debug3: mm_request_receive_expect entering: type 22 Nov 20 16:33:15 HOSTNAME sshd[12419]: debug3: mm_request_receive entering Nov 20 16:33:15 HOSTNAME sshd[12418]: debug3: monitor_read: checking request 21 Nov 20 16:33:15 HOSTNAME sshd[12418]: debug3: mm_answer_keyallowed entering Nov 20 16:33:15 HOSTNAME sshd[12418]: debug3: mm_answer_keyallowed: key_from_blob: 0x7fb00ff9ebc0 Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: temporarily_use_uid: 508/508 (e=0/0) Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: trying public key file /home/mark/.ssh/authorized_keys Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: Could not open authorized keys '/home/mark/.ssh/authorized_keys': Permission denied Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: restore_uid: 0/0 Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: temporarily_use_uid: 508/508 (e=0/0) Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: trying public key file /home/mark/.ssh/authorized_keys Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: Could not open authorized keys '/home/mark/.ssh/authorized_keys': Permission denied Nov 20 16:33:15 HOSTNAME sshd[12418]: debug1: restore_uid: 0/0 Nov 20 16:33:15 HOSTNAME sshd[12418]: Failed publickey for mark from 178.148.168.147 port 62172 ssh2 Nov 20 16:33:15 HOSTNAME sshd[12418]: debug3: mm_answer_keyallowed: key 0x7fb00ff9ebc0 is not allowed Nov 20 16:33:15 HOSTNAME sshd[12418]: debug3: mm_request_send entering: type 22 Nov 20 16:33:15 HOSTNAME sshd[12418]: debug3: mm_request_receive entering Nov 20 16:33:15 HOSTNAME sshd[12419]: debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa Nov 20 16:33:15 HOSTNAME sshd[12419]: debug3: Wrote 96 bytes for a total of 1965 Nov 20 16:33:17 HOSTNAME sshd[12419]: Received disconnect from IP : 13: User request Nov 20 16:33:17 HOSTNAME sshd[12419]: debug1: do_cleanup Nov 20 16:33:17 HOSTNAME sshd[12419]: debug3: PAM: sshpam_thread_cleanup entering Nov 20 16:33:17 HOSTNAME sshd[12419]: debug3: mm_request_send entering: type 80 Nov 20 16:33:17 HOSTNAME sshd[12419]: debug3: mm_request_receive_expect entering: type 81 Nov 20 16:33:17 HOSTNAME sshd[12419]: debug3: mm_request_receive entering Nov 20 16:33:17 HOSTNAME sshd[12418]: debug3: monitor_read: checking request 80 Nov 20 16:33:17 HOSTNAME sshd[12418]: debug3: mm_request_send entering: type 81 Nov 20 16:33:17 HOSTNAME sshd[12418]: debug3: mm_request_receive entering Nov 20 16:33:17 HOSTNAME sshd[12418]: debug1: do_cleanup Nov 20 16:33:17 HOSTNAME sshd[12418]: debug1: PAM: cleanup Nov 20 16:33:17 HOSTNAME sshd[12418]: debug3: PAM: sshpam_thread_cleanup entering Nov 20 16:33:22 HOSTNAME sshd[11630]: debug3: Received SSH2_MSG_IGNORE Nov 20 16:33:52 HOSTNAME sshd[11630]: debug3: Received SSH2_MSG_IGNORE Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 80 bytes for a total of 7077 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 96 bytes for a total of 7173 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 4160 bytes for a total of 11333 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 4160 bytes for a total of 15493 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 4160 bytes for a total of 19653 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 8272 bytes for a total of 27925 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 4160 bytes for a total of 32085 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 48533 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 64981 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 81429 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 25892 bytes for a total of 107321 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 35040 bytes for a total of 142361 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 40880 bytes for a total of 183241 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 43800 bytes for a total of 227041 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 35316 bytes for a total of 262357 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 278805 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 295253 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 311701 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 328149 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 344597 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 361045 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 32896 bytes for a total of 393941 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 410389 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 426837 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 443285 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 459733 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 476181 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 492629 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 509077 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 525525 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 541973 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 558421 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 574869 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 591317 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 607765 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 624213 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 640661 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 657109 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 32896 bytes for a total of 690005 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 706453 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 722901 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 739349 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 755797 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 772245 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 788693 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 805141 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 821589 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 838037 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 854485 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 870933 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 887381 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 903829 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 920277 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 936725 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 953173 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 969621 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 986069 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1002517 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1018965 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1035413 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1051861 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1068309 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1084757 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1101205 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1117653 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1134101 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1150549 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1166997 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1183445 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1199893 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1216341 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1232789 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1249237 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1265685 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1282133 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1298581 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1315029 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1331477 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1347925 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1364373 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1380821 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1397269 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1413717 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1430165 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1446613 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1463061 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1479509 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1495957 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1512405 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1528853 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1545301 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1561749 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1578197 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1594645 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1611093 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1627541 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1643989 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1660437 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1676885 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1693333 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1709781 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1726229 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1742677 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1759125 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1775573 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1792021 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1808469 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1824917 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1841365 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1857813 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1874261 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1890709 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1907157 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1923605 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1940053 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1956501 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1972949 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 1989397 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2005845 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2022293 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2038741 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2055189 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2071637 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2088085 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2104533 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2120981 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2137429 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2153877 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2170325 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2186773 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2203221 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2219669 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2236117 Nov 20 16:33:53 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2252565 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2269013 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2285461 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2301909 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2318357 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2334805 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2351253 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2367701 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2384149 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2400597 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2417045 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2433493 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2449941 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2466389 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2482837 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2499285 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2515733 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2532181 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2548629 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2565077 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2581525 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2597973 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2614421 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2630869 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2647317 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2663765 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2680213 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2696661 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2713109 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2729557 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2746005 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2762453 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2778901 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2795349 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2811797 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2828245 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2844693 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2861141 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2877589 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2894037 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2910485 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2926933 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2943381 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2959829 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2976277 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 2992725 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3009173 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3025621 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3042069 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3058517 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3074965 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3091413 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3107861 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3124309 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3140757 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3157205 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3173653 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3190101 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3206549 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3222997 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3239445 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3255893 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3272341 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3288789 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3305237 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3321685 Nov 20 16:33:54 HOSTNAME sshd[12187]: debug3: Wrote 16448 bytes for a total of 3338133

Любые идеи?

Проверьте /var/log/secure для sshd ошибки. Могут быть ошибки из-за неправильного владения и / или разрешений в домашнем каталоге пользователя, .ssh dir или authorized_keys сам файл так sshd проигнорирует этот файл.
Также проверьте AuthorizedKeysFile директива в /etc/ssh/sshd_config: sshd можно настроить для поиска authorized_keys файл в другом месте, а не в домашнем каталоге пользователя. Если это ваш случай, просто поставьте authorized_keys файл в нужном месте с правильным владельцем и правами и попробуйте еще раз.

Ваше описание кажется хорошим, но, возможно, вы неправильно вставили ключ (опечатка или отсутствующий символ). Чтобы помочь вам диагностировать проблему, вы можете сделать следующее:

Отредактируйте файл конфигурации /etc/ssh/sshd_config, установите уровень журнала:

LogLevel DEBUG3

и перезагрузите ssh

sudo /etc/init.d/ssh reload

Это увеличивает уровень журнала для демона ssh, чтобы вы могли узнать, что происходит. Посмотрите файл журнала ssh /var/log/auth.log о проблемах при попытке входа в систему.

Извините, я забыл, что вы используете Centos и у него есть Selinux включен по умолчанию. Итак, в вашем случае вы должны разрешить sshd доступ к папкам в /var дорожка. Вот Тема форума Centos опишите, как разрешить sshd доступ authorized_keys вне /home папка.