ubuntu 16.04 install telnet and ssh2

1. First check the running status of telnet
#netstat -a | grep The telnet
output is empty, indicating that the service is not enabled

2. Install openbsd-inetd
#apt-get install openbsd-inetd

3. Install telnetd
#apt-get install telnetd

After installation , check the content of /etc/inetd.conf, whether there is an extra line telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

4. Restart openbsd-inetd
# /etc/init.d/openbsd- inetd restart
output: * Restarting internet superserver inetd

5. Check the running status of telnet
#netstat -a | grep telnet
output: tcp 0 0 *:telnet *:* LISTEN
indicates that the telnet service has been started.

6. Telnet login test
#telnet 127.0.0.1
output:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'. (Press Ctrl+] and press Enter when stopping here)
telnet> (Indicates successful login)


7. Check the running status of ssh
#ssh localhost
output: ssh: connect to host localhost port 22: Network is unreachable
means that ssh is not installed

8. Install ssh
#apt-get install openssh-server
During the installation process, answer: Y
After installation, you can log in with SSH2

9. To restart the service, enter the command:
#/etc/init .d/ssh restart

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326105158&siteId=291194637