Ubuntu 24.04 LTS 上安装openssh-server服务并启用SSH实现远程链接
1、先更新软件包
sudo apt update && sudo apt upgrade
2、使用apt安装
sudo apt install openssh-server
3、如果需允许root用户登录,需修改sshd_config 修改PermitRootLogin no 为 PermitRootLogin yes
vi /etc/ssh/sshd_config
4、UFW放行22端口
sudo ufw allow ssh

共有 0 条评论