ubuntu 開啓telnet服務並添加可以用於登錄的用戶

問題描述

新部署了一個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:~$ 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章