ubuntu桌面版安装完成后,没有SSH功能,平时使用很不方便。
主要步骤如下:
1、安装SSH
sudo apt install openssh-server
2、启动SSH
systemctl start ssh
3、修改ssh配置文件
vi /etc/ssh/sshd_config
将#PermitRootLogin without-password修改为PermitRootLogin yes
将PasswordAuthentication no修改为PasswordAuthentication yes
4、配置root密码
sudo password root
配置root密码
5、使用Xshell或者CRT连接,用户使用root,密码使用刚才配置的密码。
6、如果连接后出现频繁断开,可以修改SSH配置文件
vim /etc/ssh/sshd_config
添加下面参数
ClientAliveInterval 30
ClientAliveCountMax 6