ssh安装配置

sudo apt update
sudo apt upgrade
sudo apt remove –purge openssh-server
sudo apt install openssh-server
systemctl start ssh
sudo systemctl status ssh
sudo systemctl enable ssh
sudo ufw allow ssh
#修改配置文件
sudo micro /etc/ssh/sshd_config
#在/etc/ssh/sshd_config文件的最下面加入以下内容,或者完全不用设置也可以
PermitRootLogin yes #允许root远程登陆
PasswordAuthentication yes # 允许密码登录
#重启ssh服务
sudo systemctl restart ssh
#在客户端登录
ssh [email protected] #根据实际情况输入服务器的用户名和IP地址
#输入密码即可登录
#完成以上步骤后,可以通过ssh客户端软件直接连接服务器


ssh安装配置
http://example.com/2025/03/12/ssh安装配置/
Author
John Doe
Posted on
March 12, 2025
Licensed under