zoukankan      html  css  js  c++  java
  • win10的子系统ubuntu20.04开启telnet和ssh服务

    0、准备工作,创建一个新的账号,此处为nication

    telnet

    1、安装软件:sudo apt install telnet telnetd openbsd-inetd

    2、修改配置文件  无需修改配置文件

    3、启动服务: sudo  service openbsd-inetd restart

    4、使用guochaoxxl账户telnet登录nication

      

     1 guochaoxxl@DESKTOP-UJQD5G6:~$ telnet 127.0.0.1
     2 Trying 127.0.0.1...
     3 Connected to 127.0.0.1.
     4 Escape character is '^]'.
     5 Ubuntu 20.04.3 LTS
     6 DESKTOP-UJQD5G6 login: nication
     7 Password:
     8 Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)
     9 
    10  * Documentation:  https://help.ubuntu.com
    11  * Management:     https://landscape.canonical.com
    12  * Support:        https://ubuntu.com/advantage
    13 
    14   System information as of Fri Dec 10 21:23:03 CST 2021
    15 
    16   System load:    0.52      Processes:             22
    17   Usage of /home: unknown   Users logged in:       0
    18   Memory usage:   61%       IPv4 address for eth0: 192.168.1.13
    19   Swap usage:     2%
    20 
    21 
    22 0 updates can be applied immediately.
    23 
    24 
    25 *** System restart required ***
    26 Last login: Fri Dec 10 16:01:12 CST 2021 from localhost on pts/0
    27 nication@DESKTOP-UJQD5G6:~$

      很明显可以看出用户由第一行guochaoxxl变成第27行的nication,中间需要输入要telnet的用户名的账号名和密码,即可。

     ssh

    1、安装软件: sudo apt install ssh openssh-server

    2、修改配置文件  sudo  vim  /etc/ssh/sshd_config

      将PasswordAuthentication no 改为PasswordAuthentication yes   启动密码登录,否则比较麻烦

    3、启动服务: sudo  service ssh restart

    4、使用guochaoxxl账户telnet登录nication

    1 guochaoxxl@DESKTOP-UJQD5G6:~$ ssh nication@127.0.0.1
    2 nication@127.0.0.1's password:
    3 Last login: Fri Dec 10 21:23:09 2021 from localhost
    4 nication@DESKTOP-UJQD5G6:~$

      很明显可以看出用户由第一行guochaoxxl变成第4行的nication,中间需要输入要ssh的用户名的账号的密码,即可。

    两者其实是一样的。

    人就像是被蒙着眼推磨的驴子,生活就像一条鞭子;当鞭子抽到你背上时,你就只能一直往前走,虽然连你也不知道要走到什么时候为止,便一直这么坚持着。
  • 相关阅读:
    AC日记——Little Elephant and Numbers codeforces 221b
    AC日记——Little Elephant and Function codeforces 221a
    AC日记——Mice and Holes codeforces 797f
    AC日记——Sliding Window poj 2823
    Poj 2976 Dropping tests(01分数规划 牛顿迭代)
    Bzoj 1968: [Ahoi2005]COMMON 约数研究
    洛谷 P2424 约数和
    Hdu Can you find it?(二分答案)
    SPOJ GSS1
    Bzoj 2243: [SDOI2011]染色(树链剖分+线段树)
  • 原文地址:https://www.cnblogs.com/guochaoxxl/p/15673947.html
Copyright © 2011-2022 走看看