kali
1、修改配置文件
vim /etc/ssh/sshd_config
2、相关字段修改
#PermitRootLogin prohibit-password
PermitRootLogin yes
#PasswordAuthentication yes
PasswordAuthentication yes
3、 启动ssh服务
/etc/init.d/ssh start
4、查看服务状态
/etc/init.d/ssh status
5、开机启动
update-rc.d ssh enable
ubuntu
如果系统没有安装ssh,先安装
sudo apt-get install openssh-server
安装后,启动即可
sudo systemctl start ssh.service //开启服务
ps aux | grep ssh //查看是否开启