вполне уверенный/var/www/html является корнем Документа на человечности.
grep -r Root /etc/apache2
Та команда должна сказать Вам documentroot или набор serverroot для Вашей системы. Можно наблюдать журналы путем выполнения
tail -f /var/log/apache2/FILE
Ctrl-C для выхода, и имена файлов варьируется установкой, но если сервис памяти, access_log и error_log будет теми, то Вам будет нужно.
Итак, я нашел решение, не знаю, лучшее ли оно, но оно позволяет мне подключиться по SSH с первой попытки. Уловка заключалась в том, чтобы избавиться от всех password-auth
, содержащихся в /etc/pam.d/sshd
, и заменить их на system-auth
. Итак, мой последний файл /etc/pam.d/sshd
выглядит так:
#%PAM-1.0
auth required pam_sepermit.so
auth include system-auth
#auth include password-auth
#account required pam_nologin.so
account required pam_access.so
account include system-auth
password include system-auth
#account include password-auth
#password include password-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open env_params
session optional pam_keyinit.so force revoke
#session include password-auth
session include system-auth
Как вы, наверное, заметили, я немного новичок в PAM. Файлы system-auth
и password-auth
включены выше в мой исходный вопрос. Может кто-нибудь объяснить мне, почему вышеизложенное меняет фиксированные вещи? Я сделал то же самое исправление, заменив все операторы include password-auth
на include system-auth
в /etc/pam.d/crond
, поскольку это не было ' t разрешить кому угодно (включая root) использовать cron / crontab. В чем разница между этими конфигурациями? Эти изменения каким-либо образом поставили под угрозу мою безопасность?
Еще раз спасибо за помощь и предложения.
Don't have reputation to add comments, but to debug PAM auth problems you are looking on the wrong side, you need to do that on server side.
To do so ssh into the server and run:
sshd -d -D -p 4000
That will start an ssh daemon on port 4000 (-p 4000
) with debug enabled (-d
), without detaching from console (-D
).
Then try again but connecting to port 4000, on the server side you will see a lot of output, there's the truth of the root of your problem, not on client side.
If you need more verbose you can add multiple -d
, up to three.
If you can't figure out from the output paste it here for us to see it.