【发布时间】:2017-08-31 09:45:32
【问题描述】:
所以我必须在本地使用他的密钥表将kinit 作为某个委托人。
由于远程服务器上的 Kerberose kdc,我通过 vpn 访问,我需要使用 ssh 访问服务器,从而建立到服务的隧道。
为此,我做了以下工作:
- 从远程服务器复制 krb5.conf 并用它替换本地
- 复制了我感兴趣的 keytab
-
因为我需要访问服务:
ssh -L1088:localhost:88 -L10749:localhost:749 remote_server -
将本地文件 krb5.conf 更改为
admin_server = localhost:10749 kdc = localhost:1088
但是当我尝试启动时
KRB5_TRACE=/dev/stdout kinit -kt ${PRINCIPAL_KEYTAB}.keytab ${PRINCIPAL_NAME}
[12332] 1504171391.121253: Getting initial credentials for ${PRINCIPAL_NAME}
[12332] 1504171391.123940: Looked up etypes in keytab: des, des-cbc-crc, aes128-cts, rc4-hmac, aes256-cts, des3-cbc-sha1
[12332] 1504171391.124027: Sending request (227 bytes) to ${DOMAIN}
[12332] 1504171391.124613: Resolving hostname localhost
[12332] 1504171391.124988: Sending initial UDP request to dgram ::1:1088
[12332] 1504171391.125070: Sending initial UDP request to dgram 127.0.0.1:1088
[12332] 1504171391.125120: Initiating TCP connection to stream ::1:1088
[12332] 1504171391.125165: Terminating TCP connection to stream ::1:1088
[12332] 1504171391.125186: Initiating TCP connection to stream 127.0.0.1:1088
[12332] 1504171391.125216: Terminating TCP connection to stream 127.0.0.1:1088
kinit: Cannot contact any KDC for realm '${DOMAIN}' while getting initial credentials
-
我通过添加
ssh -vvv重试并得到了debug1: Connection to port 1088 forwarding to localhost port 88 requested. debug2: fd 15 setting TCP_NODELAY debug2: fd 15 setting O_NONBLOCK debug3: fd 15 is O_NONBLOCK debug1: channel 7: new [direct-tcpip] debug3: send packet: type 90 debug1: Connection to port 1088 forwarding to localhost port 88 requested. debug2: fd 16 setting TCP_NODELAY debug2: fd 16 setting O_NONBLOCK debug3: fd 16 is O_NONBLOCK debug1: channel 8: new [direct-tcpip] debug3: send packet: type 90
我尝试了 tcpdump,并且本地尝试连接,但找不到任何接收到其他站点的包。
我编辑了 krb5.conf 中的所有其他信息。
我在这里缺少什么或者这可能吗?
PS:
netstat 表示端口在两台机器上都存在并打开。
我对服务器本身的kinit 没有任何问题。
PSS:
从我看到的kdc实际上是在端口udp 88而不是tcp上监听,这可能是个问题吗?
【问题讨论】: