概念纠正与总体思路
用 FileZilla 在 CentOS 与本地之间传输文件
sudo yum install -y openssh-server && sudo systemctl enable --now sshdsudo firewall-cmd --add-service=ssh --permanent && sudo firewall-cmd --reloadsudo systemctl status sshd;ss -tlnp | grep :22若目标是远程桌面控制 CentOS
sudo yum install -y epel-release && sudo yum install -y xrdpsudo systemctl enable --now xrdpsudo firewall-cmd --add-port=3389/tcp --permanent && sudo firewall-cmd --reload/etc/xrdp/startwm.sh,在脚本前部加入:
unset DBUS_SESSION_BUS_ADDRESSunset XDG_RUNTIME_DIR
然后重启 xrdp:sudo systemctl restart xrdp。上述安装与黑屏处理为常见可行方案。常见故障排查要点
/etc/ssh/sshd_config 中确保 PasswordAuthentication yes 并重启 sshd。