你提到的 “Ubuntu stream8” 可能是指 AlmaLinux / Rocky Linux 8(Stream 8 类似 RHEL 8 的衍生版),或者是 Ubuntu + RTSP/视频流(stream)相关服务。
我先按两种常见情况给你说明,你看看哪一种符合你的需求。
(SSH 或 图形界面远程)
服务端(被连接机器)
sudo apt update
sudo apt install openssh-server
sudo systemctl enable --now ssh
查看 IP:
ip a
客户端(你的电脑)
ssh 用户名@服务器IP
例如:
ssh ubuntu@192.168.1.100
✅ 适合:命令行操作、服务器管理
sudo apt install xrdp
sudo systemctl enable --now xrdp
Windows 直接用:
mstsc
连接服务器 IP
sudo apt install tigervnc-server
适合:需要完整桌面环境
比如 RTSP / WebRTC / FFmpeg
sudo apt install ffmpeg
推流示例:
ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 \
-c:v libx264 -f rtsp rtsp://服务器IP:8554/stream
远程播放:
rtsp://服务器IP:8554/stream
ffmpeg -re -i input.mp4 \
-c:v libx264 -f flv rtmp://localhost/live/stream
配合 nginx-rtmp 或 MediaMTX
命令略有不同:
dnf install openssh-server
systemctl enable --now sshd
我可以直接给你一步步命令 + 端口配置。