Skip to content

Xray的docker容器为什么会有ssh的登录动作记录 #4617

@toyo2333

Description

@toyo2333

用last -a 查看,看到一条这个记录

root     pts/0        Wed Apr  9 17:06 - 17:06  (00:00)     172.18.0.2

这个ip是我本机xray的容器ip

我问了chatgtp,并根据他的提醒做了一些排查

比如通过

grep 'sshd' /var/log/auth.log | grep 172.18.0.2

查询没有结果。

我的xray配置很简单(机器上也只有xray一个容器)

services:
  xray:
    image: ghcr.io/xtls/xray-core:latest
    container_name: xray
    restart: unless-stopped
    logging:
      options:
        max-size: 10m
    ports:
      - "443:443"
    volumes:
      - ./xray:/etc/xray

然后我运行:journalctl _COMM=sshd | grep 'Accepted'

Apr 09 17:06:08 xxxxxx sshd[84663]: Accepted password for root from 172.18.0.2 port 58844 ssh2

这个查询显示xray容器通过密码登录了主机?

以前我也会做这个查询,但此前从来没有见到过这样的记录。

请问这是啥原因呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions