Ubuntu-安装ssh服务和telnet服务
1.安装ssh服务
(1)安装openssh
sudo apt-get install openssh-server
# ufw disable
(2)重启并查看openssh是否正常
sudo systemctl restart ssh
sudo systemctl status ssh
(3)允许root通过ssh登陆
sudo vim /etc/ssh/sshd_config
(按字母i表示插入,再按一次退出,:wq保存)
把配置文件中的"PermitRootLogin without-password"加一个"#"号注释掉,
增加一句"PermitRootLogin yes"
sudo systemctl restart sshd
2.安装telnet服务
(1)安装openbsd-inetd软件包
sudo apt-get install openbsd-inetd
(2)安装telnetd服务
sudo apt-get install telnetd
(3)查看运行状态
sudo netstat -a | grep telnet
(4)若登录失败,重启openbsd-inetd服务或系统
sudo /etc/init.d/openbsd-inetd restart
(5)说明(telnet不允许root用户直接登录)
由于安全考虑,telnet不允许root用户直接登录,需要您先建立一个普通用户,使用这个用户登录,再转换到root用户

浙公网安备 33010602011771号