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
    • 最新
    • 标签
主页 / user-385027

Hamish Moffatt's questions

Martin Hope
Hamish Moffatt
Asked: 2021-08-05 23:28:59 +0800 CST

使用谷歌身份验证器的 SSH 公钥身份验证仍然要求输入密码

  • 4

我正在尝试使用 libpam-google-authenticator 通过 ssh 启用 2FA。并非所有用户都需要启用身份验证器。每个人都使用 ssh 公钥,没有人有密码。我正在运行 Debian buster,并且我还尝试了来自 Bullseye 的 libpam-google-authenticator。

我的问题是,无论我在 PAM 配置中添加什么,没有启用身份验证器的用户永远不会直接登录,而是总是要求输入密码。

我已经安装了 libpam-google-authenticator 并配置了 /etc/ssh/sshd_config :

PasswordAuthentication no
ChallengeResponseAuthentication yes
AuthenticationMethods publickey,keyboard-interactive
PasswordAuthentication no
PermitEmptyPasswords no

我无法计算出正确的 PAM 配置,因此没有 .google_authenticator 文件的用户仍然可以登录。根据我使用的内容,系统会提示用户输入密码(他们没有密码),或者没有完全允许进入。

在 /etc/pam.d/sshd 我尝试过(像这样Trying to get SSH with public key (no password) + google 身份验证器在 Ubuntu 14.04.1 上工作):

#@include common-auth
auth       required     pam_google_authenticator.so debug nullok

在这种情况下,没有验证器设置的用户会被以下调试拒绝;

Aug 05 15:11:18 <host> sshd(pam_google_authenticator)[746624]: debug: start of google_authenticator for "<user>"
Aug 05 15:11:18 <host> sshd(pam_google_authenticator)[746624]: debug: end of google_authenticator for "<user>" Result: The return value should be ignored by PAM dispatch
Aug 05 15:11:18 <host> sshd[746620]: error: PAM: Permission denied for <user> from <IP>

是否pam_permit需要设置后备案例?

我也尝试过之前和之后的各种组合,auth required但auth sufficient它们@include common-auth都会导致没有验证器的用户被要求输入密码,有时也会要求有验证器的用户输入密码。

有没有人有做这个工作的食谱?

debian pam google-authenticator two-factor
  • 2 个回答
  • 1093 Views
Martin Hope
Hamish Moffatt
Asked: 2018-01-02 19:25:33 +0800 CST

ESXi 中最近的 linux 内核的磁盘写入性能非常慢

  • 2

我有一个在 VMWare ESXi 6.5U1 中运行的 Linux 客户机,我最近从 Debian 8 升级到了 Debian 9,磁盘写入速度现在很糟糕。

内核现在是4.9.0-4-686-pae. 使用 进行测试时 if=/dev/zero bs=16k count=256k of=foo,它测量为 14Mb/​​秒。真正的应用程序在写入时非常慢并且 CPU 负载很高。

如果我将内核恢复到以前使用的内核3.16.0-4-amd64,写入性能将恢复正常(数百 mbit/秒)。我没有做任何其他更改,只是从 grub 启动菜单中选择了旧内核。

根据有关 serverfault 的其他问题的建议,我已将 I/O 调度程序设置为 noop,将来宾硬件配置更改为 1 个具有 4 个内核的虚拟套接字(以前相反),并将磁盘控制器更改为 VMWare 半虚拟化一个(以前的 LSI Logic 并行 SCSI),但这些都没有任何区别。

阅读速度似乎没有受到影响,尽管我没有明确测量过。

如何使用新内核修复性能?

linux
  • 2 个回答
  • 2324 Views

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