powered by simpleCommunicator - 2.0.38     © 2025 Programmizd 02
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / kerberos аутентификация для SSH в RHEL 7
1 сообщений из 1, страница 1 из 1
kerberos аутентификация для SSH в RHEL 7
    #39482313
Ares_ekb
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Добрый день!

Пытаюсь настроить аутентификацию в Oracle Linux 7.

Включил Kerberos:

Код: sql
1.
authconfig --enablekrb5 --update


Немного смущает, что настройки не добавились в файл /etc/pam.d/sshd
Код: sql
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
# grep krb -R /etc/pam.d/
/etc/pam.d/password-auth-ac:auth        sufficient    pam_krb5.so use_first_pass
/etc/pam.d/password-auth-ac:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/password-auth-ac:password    sufficient    pam_krb5.so use_authtok
/etc/pam.d/password-auth-ac:session     optional      pam_krb5.so
/etc/pam.d/system-auth:auth        sufficient    pam_krb5.so use_first_pass
/etc/pam.d/system-auth:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/system-auth:password    sufficient    pam_krb5.so use_authtok
/etc/pam.d/system-auth:session     optional      pam_krb5.so
/etc/pam.d/password-auth:auth        sufficient    pam_krb5.so use_first_pass
/etc/pam.d/password-auth:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/password-auth:password    sufficient    pam_krb5.so use_authtok
/etc/pam.d/password-auth:session     optional      pam_krb5.so
/etc/pam.d/fingerprint-auth-ac:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/fingerprint-auth-ac:session     optional      pam_krb5.so
/etc/pam.d/fingerprint-auth:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/fingerprint-auth:session     optional      pam_krb5.so
/etc/pam.d/system-auth-ac:auth        sufficient    pam_krb5.so use_first_pass
/etc/pam.d/system-auth-ac:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/system-auth-ac:password    sufficient    pam_krb5.so use_authtok
/etc/pam.d/system-auth-ac:session     optional      pam_krb5.so
/etc/pam.d/smartcard-auth-ac:auth        optional      pam_krb5.so use_first_pass no_subsequent_prompt
/etc/pam.d/smartcard-auth-ac:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/smartcard-auth-ac:session     optional      pam_krb5.so
/etc/pam.d/smartcard-auth:auth        optional      pam_krb5.so use_first_pass no_subsequent_prompt
/etc/pam.d/smartcard-auth:account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
/etc/pam.d/smartcard-auth:session     optional      pam_krb5.so


Это работает:
Код: sql
1.
2.
3.
4.
5.
6.
7.
8.
# kinit test@DOMAIN
# klist
Ticket cache: KEYRING:persistent:0:krb_ccache_RxUTaCr
Default principal: test@DOMAIN

Valid starting       Expires              Service principal
07/04/2017 14:02:54  07/05/2017 00:02:54  krbtgt/DOMAIN@DOMAIN
        renew until 07/11/2017 14:02:50


Конфиги:
/etc/ssh/ssh_config...
Host *
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
...
/etc/ssh/sshd_config...
# Kerberos options
KerberosAuthentication yes
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes
...
# GSSAPI options
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
#GSSAPIEnablek5users no
...
#UseDNS yes


Пытаюсь подключиться и не получается, спрашивает пароль:
Код: sql
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
# ssh -K -v host
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to host [XXX.XXX.XXX.XXX] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16
debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA c0:81:eb:a1:29:a1:9a:6c:12:63:3a:e0:98:f1:fc:33
debug1: Host 'host' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ed25519
debug1: Next authentication method: password


В /var/log/messages пишет:
Код: l
1.
winbindd[10565]: [2017/07/04 14:09:01.723086,  0] ../source3/librpc/crypto/gse.c:341(gse_get_client_auth_token)
winbindd[10565]:  gss_init_sec_context failed with [Unspecified GSS failure.  Minor code may provide more information: Server not found in Kerberos database]


В чем может быть проблема?
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / kerberos аутентификация для SSH в RHEL 7
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]