问题描述
新部署了一个Ubuntu服务器,可以通过ssh登录,但是不能telnet。通过ssh安装了telnet服务能telnet上,但是一直无法通过root登录,在新建了用户之后,用新的用户名和密码成功登录。所以对于新的设备来说,要想成功telnet远程服务器需要至少以下两步。
先添加用户
在管理员模式下输入 useradd choudan,然后输入两次密码即可创建成功
:~# adduser choudan
Adding user `choudan' ...
Adding new group `choudan' (1000) ...
Adding new user `choudan' (1000) with group `choudan' ...
Creating home directory `/home/choudan' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for choudan
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
安装telnet服务
apt install telnetd
测试
Ubuntu 18.04.4 LTS
iZj6c4a5lyjvcskaf9sodnZ login: choudan
Password:
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-96-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
* MicroK8s passes 9 million downloads. Thank you to all our contributors!
https://microk8s.io/
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Welcome to Alibaba Cloud Elastic Compute Service !
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
choudan@iZj6c4a5lyjvcskaf9sodnZ:~$
choudan@iZj6c4a5lyjvcskaf9sodnZ:~$