We will not talk about the functions of these two servers. Many books have a detailed introduction to the advantages and disadvantages of these two protocols. We will go directly to the configuration stage.
I am using Ubuntu version 10.04. Different versions may be slightly different. If there are any errors, please kindly advise.
1. Telnet
Installation:
We need to install the server first. Enter the following command line:
$: Sudo apt-Get install telnet-Server
There are many packages to choose from. I chose telnetd:
$: Sudo apt-Get install telnetd
Note:Sometimes, inetd is not installed on Ubuntu on the local machine. You must first install it:
$: Sudo apt-Get install OpenBSD-inetd
Start:
After the installation is complete, the telnet server is not started yet and cannot be manually started using the telnetd command. It must be started through the inetd process. First, check the inetd. conf configuration file and check whether the server has been installed successfully:
$: CAT/etc/inetd. conf
If the output contains the following content, the installation is successful:
Telnet stream tcp Nowait root/usr/sbin/tcpd/usr/sbin/in. telnetd
Then we restart the inetd process. Now the Server Installation and startup are complete:
$:/Etc/init. d/OpenBSD-inetd restart
Check:
To check whether the server is started, run the following command:
$: Sudo netstat-vat
If telnet is in the listen status, the server is started.
Disable server startup:
Just comment out the line about telnetd in the/etc/inetd. conf file.
Inetd is not started when no service needs to be started.
It is worth mentioning that:
Inetd configuration file:/etc/inetd. conf
2. SSH
Installation:
Install the SSH server first. Enter the following command line:
$: Sudo apt-Get Install SSH-Server
There are many packages to choose from. I chose openssh-Server:
$: Sudo apt-Get install OpenSSH-Server
Start:
To start an SSH server, enter the serverProgramComplete execution path of the location:
$: Sudo/usr/sbin/sshd
Check:
To check whether the server is started, run the following command:
$: Sudo netstat-vat
If SSH is in the listen status, the server is started.
Disable server startup:
Just comment out the last line in the/etc/init/ssh. conf file:
# Exec/usr/sbin/sshd-d
It is worth mentioning that:
Sshd startup parameter file:/etc/init/ssh. conf
Sshd key record file :~ /. Ssh/known_hosts
SSH and sshd configuration files:/etc/ssh /*