发新话题
打印

Linux登录ssh sftp失败或缓慢

Linux登录ssh sftp失败或缓慢

# If Debian 11 is ran on a LXC container (Proxmox), SSH login and sudo actions can be slow
# Check if in /var/log/auth.log the following messages
Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)

-> Run  systemctl mask systemd-logind
-> Run pam-auth-update (and deselect Register user sessions in the systemd control group hierarchy)

或者 编辑 /etc/hosts文件
将添加需要登录的IP,保存退出

或者 编辑 /etc/resolv.conf
去掉所有的 nameserver 设置,保存,ssh/sftp登录后再重新启用nameserver 设置

原文:
https://gist.github.com/charlyie/76ff7d288165c7d42e5ef7d304245916

参考:
https://jrs-s.net/2017/07/01/slow-ssh-logins/

[ 本帖最后由 linda 于 2024-3-14 11:07 编辑 ]

TOP

发新话题