Replacement of Linux Telnet Service (1)

Source: Internet
Author: User

In some settings, we often encounter problems with the Telnet service. Here we will mainly explain how to replace Telnet in Linux. First, let's take a look at the system environment. I wonder if you have found that the Telnet feature is changed from the "preset startup" condition in the latest Linux kit to the user-enabled status? That is to say, RedHat in 7. if you need the Telnet service after Version x, you must start it on your own because it has been excluded from the "preset startup" service project! Why? This is because the Telnet service sends commands in the "plaintext" status when transmitting data or performing any work, when someone is interested in listening to your data packets with the listen function, the information you send will be captured and stolen! Therefore, basically, it is a very insecure data transmission method! Therefore, in the recently released Linux version, such as RedHat7.x, their Telnet service is no longer a "preset startup" function!

What should we do if we want to connect to the host from the remote end? Since the use of Telnet is not feasible, what method should we use? Haha, there is a better way to provide it now! Use openssh! The most important thing about this SSH service is that you can use the "non-plaintext" method to transmit the data packets you typed. That is to say, your data is on the Internet, even if it is stolen by the listener, SSH is an encrypted packet, so even if it is stolen, it is not three days for the information to be decrypted, this is a safer job! In addition, SSH also provides security modules that work with PAM, and limits the packets with TCPWrappers, that is,/etc/hosts. allow and/etc/hosts. deny mechanism), so the security is relatively high! In addition, you can use the root identity to log on to your host through ssh!

Okay! Next let's talk about how to change your Telnet to ssh connection? Because the default ssh status after RedHat7.x is "enabled", you can use ssh without any configuration. What if it was a system earlier than RedHat6.x? It is also very simple. You only need to install the two packages below. If you install RedHat6.x, it is fully installed!

SSH build for the host system:

◆ RedHat7.x system:

Because the RedHat7.x system has already enabled sshd, you can directly connect your host through ssh! However, if SSH is not enabled properly, how should I start it? It is also very simple. You can do this:

1. Use the "/usr/sbin/setup" program to enter the setup interface;

2. Select the "SystemServices" project;

3. Move down to [*] sshd "and select [*] and press the blank key );

4. Press the tab key to move to OK and press enter;

In this way, the startup is set up! Then start the ssh service in the following way:

/Etc/rc. d/init. d/sshdstart

To start the sshd service, do you want to know if it is normal to start ssh? Just enter the following command:

Netstat-a | more

If everything is normal, you will see a line similar to the following:

Tcp00 *: ssh *: * LISTEN

It indicates that ssh has been successfully started! However, what if your Linux system does not install the ssh service? Haha! Install him! In fact, the main program of the ssh service is called openSSH! Then, if you want to install openssh to provide the ssh service, you can skip to RedHat's website to update Errata at any time! You can follow the link below to RedHat to download the latest openssh suite of your system!

Red Hat Errata webpage

Then press your RedHat version and go to the openssh toolkit. That's it! Then, press the link and find your system version. For example, I directly caught the i386 RPM file and then came back to execute it as root:

Rpm-ivhopenssh *

If you only want to Upgrade openssh, use:

Rpm-Uvhopenssh *

What's more, upgrade with up2date directly, but it will be slower !)

Up2date-iopenssh

After the upgrade, you can start the ssh service directly in the above way!

VBird's experience during the last update of openSSH suites, it was because old openssh posted on the Internet may have some security issues, so VBird was updated, however, I did not expect SSH will not work after the update is complete! It was a big shock! Later, I found some files and found that the attributes of the pre-defined PAM module were wrong! You can go to/etc/pam. d. If you look at this directory, you will find that the sshd attribute is 600, which is different from other archive attributes. Then run chmod644sshd! If you find this problem after the update, refer to it!

◆ Start the ssh service in Linux versions earlier than RedHat6.x:

Well, how can I execute the ssh service in versions earlier than RedHat6.x? As mentioned above, ssh is actually a kind of openssh suite. openssh has a suite that uses openssl, which is confidential. In fact, there are other suites that need to be installed, however, because I set the condition that you have used "complete installation" to install your Linux system, other packages should have been installed completely !) VBird is not recommended to use RPM to install openssh, because installing openssh RPM in versions earlier than RedHat6.x is too troublesome! Therefore, we can use the tarball Method for installation!


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.