Configuration of the Ubuntu telnet server and the SSH server

Source: Internet
Author: User
Tags ssh server

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 /*

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.