AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 569360
Accepted
Chas. Owens
Chas. Owens
Asked: 2014-01-24 06:25:15 +0800 CST2014-01-24 06:25:15 +0800 CST 2014-01-24 06:25:15 +0800 CST

为什么我必须每天用我的密码登录 ssh 一次?

  • 772

当我尝试使用 ssh-agent 中保存的加密密钥进行 ssh 时,我得到以下信息(使用ssh -vvv):

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/cowens/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: BLAH
debug3: sign_and_send_pubkey: RSA BLAH
debug3: input_userauth_banner
Access denied
Access denied
Connection closed by BLAH

如果我强制它使用密码ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no(

debug1: Offering RSA public key: /home/cowens/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: BLAH
debug3: sign_and_send_pubkey: BLAH
debug1: Authentication succeeded (publickey).
Authenticated to BLAH ([BLAH]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug1: Requesting authentication agent forwarding.
debug2: channel 0: request [email protected] confirm 0
debug2: fd 3 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.

服务器使用 Active Directory 来存储用户信息,所以我认为它与此有关,但我曾在过去与 Linux 一起使用 AD 的环境中工作,并且没有遇到此问题。

active-directory
  • 1 1 个回答
  • 295 Views

1 个回答

  • Voted
  1. Best Answer
    etherfish
    2014-01-24T06:52:38+08:002014-01-24T06:52:38+08:00

    在不知道机器设置的具体细节的情况下,我只能给你一个假设。Microsoft Active Directory 建立在用于用户/目录信息的 LDAP 和用于身份验证/加密的 Kerberos5 之上。

    所以,这里是它的核心。当您向 Kerberos 系统进行身份验证时,您将获得一张票证。例如,此票证是操作系统代表您用于在网络上识别您的加密凭证。这些票证通常具有有限的默认生命周期。在这种情况下,我的猜测是大约 10 个小时。

    您的 ssh 密钥对将不起作用,因为该服务器上的某些组件已配置为需要您的票证,而获得 kerberos 票证需要您的密码。一旦它被发布给你(在那台机器上),它就可以用于任何依赖它的配置组件。过期后,您需要进行身份验证才能获得新的。

    我熟悉在这种情况下使用 pam_krb5 和 libnss-ldapd;我不熟悉其他人。如果我的猜测是正确的,一旦你在你的 shell 中,输入“klist -v”来查看你是否已经获得了一张票。

    希望这可以帮助。

    • 5

相关问题

  • 如果以域用户身份远程登录,PC 速度极慢

  • 如何在 Windows 2003 的 ou 级别应用策略

  • 允许用户更改其 Active Directory 密码的 Web 界面

  • MOSS 2007 无法使用 ActiveDirectoryMembershipProvider 配置表单身份验证

  • 通过 VPN 更改 Active Directory 密码

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve