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
    • 最新
    • 标签
主页 / unix / 问题 / 410032
Accepted
Max Lazar
Max Lazar
Asked: 2017-12-11 00:49:48 +0800 CST2017-12-11 00:49:48 +0800 CST 2017-12-11 00:49:48 +0800 CST

在此服务器上更新到 OpenSSH 7.6 后无法连接到 Centos 6.9 [重复]

  • 772
这个问题在这里已经有了答案:
如何在 Debian 8.0 上启用 diffie-hellman-group1-sha1 密钥交换? (3 个回答)
4年前关闭。

我知道在 Centos 6.9 上将 OpenSSH 更新到 v. 7.6 不是一个好主意,但它已经完成了。所以现在我无法通过 ssh 连接到服务器。

尝试使用密钥登录:

debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
debug2: input_userauth_pk_ok: fp SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxx
debug3: sign_and_send_pubkey: RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxx
debug3: send packet: type 50
Authentication failed.

尝试使用root密码登录:

debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.

还有什么办法可以解决这个问题或降级openssh?

ps 我使用 OpenSSH_7.5p1 从 MacOs 连接,使用 OpenSSH_7.4p1 从 CentOs 7 连接,所以我的问题不在于遗留问题。

谢谢!

centos openssh
  • 1 1 个回答
  • 2583 Views

1 个回答

  • Voted
  1. Best Answer
    Max Lazar
    2017-12-11T11:57:44+08:002017-12-11T11:57:44+08:00

    因此,首先,OpenSSH 更新会覆盖 sshd_config 文件,从而无法通过 root 登录系统(因此,如果您从源更新 OpenSSH - 不要忘记在注销前检查 sshd_config)。但是我能够使用 Parallels VM Console 连接和更改 sshd_config 但仍然遇到相同的连接问题。

    我遇到的第二个问题是 sshd (/etc/pam.d/sshd) 的 PAM 配置未更新并请求旧文件

    openssh PAM unable to dlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot open shared object file: No such file or directory
    

    对于这种情况,我首先尝试使用我在互联网上找到的解决方案,但最后,我使用 Centos7 更改 sshd 使用来自另一台服务器的相同配置:

    #%PAM-1.0
    auth       required pam_sepermit.so
    auth       substack     password-auth
    auth       include      postlogin
    # Used with polkit to reauthorize users in remote sessions
    -auth      optional     pam_reauthorize.so prepare
    account    required     pam_nologin.so
    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    required     pam_namespace.so
    session    optional     pam_keyinit.so force revoke
    session    include      password-auth
    session    include      postlogin
    # Used with polkit to reauthorize users in remote sessions
    -session   optional     pam_reauthorize.so prepare
    

    更改后,我能够登录系统。

    • 1

相关问题

  • smartmontools - 自动测试是否与运行简短测试相同?

  • systemctl 命令在 RHEL 6 中不起作用

  • 为什么我的交换机没有从指定的池中获取地址

  • 在 CentOS7 GNOME 的 Applications-menu 选项卡中创建自定义菜单

  • 奇怪的路由器与centos 6一起工作[关闭]

Sidebar

Stats

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

    JSON数组使用jq来bash变量

    • 4 个回答
  • Marko Smith

    日期可以为 GMT 时区格式化当前时间吗?[复制]

    • 2 个回答
  • Marko Smith

    bash + 通过 bash 脚本从文件中读取变量和值

    • 4 个回答
  • Marko Smith

    如何复制目录并在同一命令中重命名它?

    • 4 个回答
  • Marko Smith

    ssh 连接。X11 连接因身份验证错误而被拒绝

    • 3 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Marko Smith

    systemctl 命令在 RHEL 6 中不起作用

    • 3 个回答
  • Marko Smith

    rsync 端口 22 和 873 使用

    • 2 个回答
  • Marko Smith

    以 100% 的利用率捕捉 /dev/loop -- 没有可用空间

    • 1 个回答
  • Marko Smith

    jq 打印子对象中所有的键和值

    • 2 个回答
  • Martin Hope
    EHerman JSON数组使用jq来bash变量 2017-12-31 14:50:58 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Drux 日期可以为 GMT 时区格式化当前时间吗?[复制] 2017-12-26 11:35:07 +0800 CST
  • Martin Hope
    AllisonC 如何复制目录并在同一命令中重命名它? 2017-12-22 05:28:06 +0800 CST
  • Martin Hope
    Steve “root”用户的文件权限如何工作? 2017-12-22 02:46:01 +0800 CST
  • Martin Hope
    Bagas Sanjaya 为什么 Linux 使用 LF 作为换行符? 2017-12-20 05:48:21 +0800 CST
  • Martin Hope
    Cbhihe 将默认编辑器更改为 vim for _ sudo systemctl edit [unit-file] _ 2017-12-03 10:11:38 +0800 CST
  • Martin Hope
    showkey 如何下载软件包而不是使用 apt-get 命令安装它? 2017-12-03 02:15:02 +0800 CST
  • Martin Hope
    youxiao 为什么目录 /home、/usr、/var 等都具有相同的 inode 编号 (2)? 2017-12-02 05:33:41 +0800 CST
  • Martin Hope
    user223600 gpg —list-keys 命令在将私钥导入全新安装后输出 uid [未知] 2017-11-26 18:26:02 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve