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-73145

amateur barista's questions

Martin Hope
amateur barista
Asked: 2021-03-10 04:16:22 +0800 CST

Git、WSL2、SSH:读取边带数据包时意外断开连接

  • 4

尝试使用 SSH 克隆远程 Git 存储库时,出现以下错误:

git clone user@remote-repo:project.git .
remote: Counting objects: 187444, done.
remote: Compressing objects: 100% (73430/73430), done.
client_loop: send disconnect: Broken pipe.06 MiB | 4.04 MiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed

我的环境具有以下规格:

  • WSL2(Windows 子系统 4 Linux)
  • git --version git version 2.30.1

git 包可以在这里找到https://pkgs.alpinelinux.org/package/edge/main/x86_64/git

uname -a
Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 Linux

2021-03-09-07:11AM wsl@Alpine:~$ more /etc/issue
Welcome to Alpine Linux 3.10
Kernel \r on an \m (\l)

我不知道为什么会这样。是 Alpine 上的突发问题还是内核配置问题?WSL?我怀疑它是远程主机。远程主机适用于 SSH,也适用于每个非 WSL 用户的克隆。

linux ssh git alpine windows-subsystem-for-linux
  • 4 个回答
  • 14722 Views
Martin Hope
amateur barista
Asked: 2012-08-11 14:01:20 +0800 CST

PAM 模块导致大量 SSH 会话

  • 2

在拖尾/var/log/auth.log时,我注意到用户“foo”每分钟(立即)输入多个条目。我个人只有一个连接作为用户“root_bar”打开,同时拖尾auth.log(下面的日志示例)。如您所见,没有此传入 SSH 连接的 IP 信息。跟踪传入 SSH 连接的 IP 地址的最佳方法是什么?

Aug 10 14:30:04 ps2000 suexec: (pam_unix) session opened for user root_bar by (uid=999)
Aug 10 14:30:04 ps2000 suexec: (pam_unix) session closed for user root_bar
Aug 10 14:30:06 ps2000 suexec: (pam_unix) session opened for user root_bar by (uid=999)
Aug 10 14:30:06 ps2000 suexec: (pam_unix) session closed for user root_bar
Aug 10 14:30:08 ps2000 CRON[16879]: (pam_unix) session closed for user root_bar
Aug 10 14:30:14 ps2000 suexec: (pam_unix) session opened for user root_bar by (uid=999)
Aug 10 14:30:14 ps2000 suexec: (pam_unix) session closed for user root_bar
Aug 10 14:30:16 ps2000 suexec: (pam_unix) session opened for user root_bar by (uid=999)
Aug 10 14:30:16 ps2000 suexec: (pam_unix) session closed for user root_bar
Aug 10 14:30:27 ps2000 suexec: (pam_unix) session opened for user root_bar by (uid=999)
Aug 10 14:30:27 ps2000 suexec: (pam_unix) session closed for user root_bar
Aug 10 14:30:39 ps2000 suexec: (pam_unix) session opened for user root_bar by (uid=999)
Aug 10 14:30:39 ps2000 suexec: (pam_unix) session closed for user root_bar

免责声明:出于安全原因,服务器名称和所有用户信息均已更改。

更正:问题“跟踪传入的 SSH 连接”已由下面的张贴者正确回答。消息suexec (pam_unix) session不一定表示sshd@aseq 澄清的任何活动,由于我的无知,我将其发布为 sshd 问题。由于原始问题及其答案很有帮助,因此我接受了最有帮助的答案。我认为追踪suexec: (pam_unix) session是一个单独问题的候选者。

最后更新:我发现上面的消息确实与 sshd 有关。在 /etc/pam.d/common-auth 中做了一些调整后,我开始看到诸如

Aug 10 16:45:23 candy_bass sshd[427]: (pam_unix) session opened for user summer_flag by (uid=0)
Aug 10 16:45:23 candy_bass sshd[427]: PAM pam_parse: expecting return value; [...sucess=1 default=ignore]
Aug 10 16:45:23 candy_bass sshd[427]: PAM pam_parse: expecting return value; [...sucess=1 default=ignore]
Aug 10 16:45:23 candy_bass sshd[427]: Accepted publickey for summer_flag from xxx.zzz.yyy.abc port 35964 ssh2
Aug 10 16:45:23 candy_bass sshd[427]: (pam_unix) session opened for user summer_flag by (uid=0)
Aug 10 16:45:23 candy_bass pam_limits[427]: setrlimit limit #11 to soft=-1, hard=-1 failed: Operation not permitted; uid=0 euid=0
Aug 10 16:45:23 candy_bass pam_limits[427]: setrlimit limit #12 to soft=-1, hard=-1 failed: Operation not permitted; uid=0 euid=0
Aug 10 16:45:23 candy_bass sshd[427]: (pam_unix) session closed for user summer_flag

所以这与sshd 有关,但是,由于这是特定于 token-auth 供应商(出于隐私原因我没有透露其名称),我认为供应商可能会更好地解决这个问题。

ssh
  • 5 个回答
  • 27283 Views
Martin Hope
amateur barista
Asked: 2012-08-08 14:44:03 +0800 CST

sshd_config 与 authorized_keys 命令参数

  • 0

背景:我将 OTP 令牌身份验证添加到我的 Web 服务器。我用命令修改了/etc/ssh/sshd_config文件ForceCommand /token/script。

问题:我有一个本地 Jenkins 实例连接到 Web 服务器以进行部署;Jenkins 无法输入令牌信息或响应电话(虽然谁知道,我敢打赌甚至有一个插件!)。

可能的解决方案:使用~/user/authorized_keys命令参数在所有密钥上强制执行令牌脚本,jenkins 使用的密钥除外。

问题:与全局 sshd_config 方法相比,authorized_keys 方法的安全性如何?你认为这是一个可以接受的权衡吗?是否有更好的解决方案(允许 Jenkins 进行从属部署,同时让其他所有人都使用令牌身份验证锁定?)。

我已经尝试了这两种方法,并且都非常有效。我发现第二种方法在部署方面更实用,但它给我带来了某种内部危险信号。我不知道我是不是在追鬼(带着红旗)。讨论!

security
  • 1 个回答
  • 800 Views
Martin Hope
amateur barista
Asked: 2012-08-07 15:35:12 +0800 CST

如何为 Debian 4.0 Etch 更新 sources.list?

  • 2

我正在尝试更新我/etc/apt/sources.list的 VPS。当我运行时,apt-get update我得到各种未找到的 404,例如:

Failed to fetch http://debian.newdream.net/dists/etch/main/binary-amd64/Packages.gz  404 Not Found
Failed to fetch http://security.debian.org/dists/etch/updates/main/binary-amd64/Packages.gz  404 Not Found [IP: 149.20.20.6 80]
Failed to fetch http://www.ksplice.com/apt/dists/etch/ksplice/binary-amd64/Packages.gz  404 Not Found

当我查看http://www.debian.org/releases/etch/时,我没有看到任何关于档案的信息。我在 archive.debian.org 里面,但我对如何按照它的说明/修改源列表有点困惑。这是当前列表的内容:

deb http://debian.di.newdream.net/ etch ndn
deb http://www.ksplice.com/apt etch ksplice
deb http://debian.newdream.net etch main non-free contrib
deb http://www.backports.org/debian/ etch-backports main
deb http://archive.debian.org/debian-volatile etch/volatile main contrib non-free
deb http://security.debian.org/ etch/updates main
deb http://debian.dc-uoit.net/debian-multimedia/ etch main

根据我在存档 README 上阅读的内容,我认为格式应该是这样的:

deb http://archive.debian.org/debian-security dists/etch/updates/ main

此外,在注释掉源文件中的大部分(如果不是全部)行之后,我仍然遇到相同的错误。是否需要运行命令来清除缓存?

debian
  • 2 个回答
  • 5780 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