ubuntuSSH 无法远程登录问题Failed to start ssh.service: Unit ssh.service not found.

ubuntuSSH 无法远程登录问题

问题

 systemctl start ssh
Failed to start ssh.service: Unit ssh.service not found.

解决

sudo apt-get install openssh-server
sudo vi /etc/ssh/sshd_config
PermitRootLogin yes -- 添加

ubuntuSSH 无法远程登录问题Failed to start ssh.service: Unit ssh.service not found._第1张图片
重启ssh

 sudo service ssh restart

查看22端口

 netstat -nultp|grep 22

在这里插入图片描述
借鉴
https://blog.csdn.net/xiato_yu/article/details/104166581

SSH登录kali时拒绝连接

xshell总是提示密码错误(密码是正确的)
解决:
https://blog.csdn.net/weixin_42084673/article/details/102969536

回顾一下命令

开启ssh:

	systemctl start ssh
	或者
	service ssh start

查询防火墙状态

	ufw status
	或者
	service iptables status

防火墙的关闭打开

	ufw disable
	或者
	 /etc/init.d/iptables stop
	 或者
	 service firewalld stop
	 service iptables stop

	ufw enable

你可能感兴趣的:(ssh)