Install SSH on Linux

Source: Internet
Author: User
Tags ssh server dns spoofing

What is SSH? Secure Shell (SSH) is developed by the Network Working Group of IETF. SSH is a security protocol created on the application layer and transport layer, provides a secure transmission and use environment for the Shell layer on the computer. Traditional network service programs, such as rsh, FTP, POP, and Telnet, are inherently insecure because they transmit data, user accounts, and user passwords in plain text on the network, attackers are vulnerable to man-in-the-middle attacks. There is another person or a machine impersonating a Real Server to receive data from the user to the server, and then impersonating the user to pass the data to the Real Server. SSH is a reliable protocol designed for remote logon sessions and other network services. The SSH protocol can effectively prevent information leakage during Remote Management. SSH can be used to encrypt all transmitted data and prevent DNS Spoofing and IP spoofing. Another advantage of SSH is that the data transmitted can be compressed, so it can speed up transmission. SSH has many functions. It can replace Telnet, provide a secure "channel" for FTP, POP, and even PPP ".

The following uses the CentOS platform as an example to describe how to install the ssh server. For convenience, the following operations are performed with the root user permission. In actual cases, use the general user permission, just add sudo.

[Root @ localhost ~] # Yum install openssh-server
In this way, you can install the ssh-server.
To check whether SSH has been installed, run the following command:

[Bkjia @ localhost ~] $ Ssh-version
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
Bad escape character 'rsion '.
If the above information is displayed, SSH is installed.

Some users may ask, how do I remember to install openssh-server instead of yum install ssh directly? Here is a method (CentOS platform) for you to quickly learn the name of the installation program. As follows:

[Root @ localhost ~] # Yum search ssh
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* Base: mirrors.btte.net
* Extras: mirrors.btte.net
* Updates: www.ftp.ne.jp
============================== N/S Matched: ssh ================================
Ksshaskpass. x86_64: a kde version of ssh-askpass with KWallet support
Libssh2.i686: A library implementing the SSH2 protocol
Libssh2.x86 _ 64: A library implementing the SSH2 protocol
Libssh2-devel.i686: Development files for libssh2
Libssh2-devel.x86_64: Development files for libssh2
Libssh2-docs.x86_64: Documentation for libssh2
Openssh. x86_64: An open source implementation of SSH protocol versions 1and 2
Openssh-askpass.x86_64: A passphrase dialog for OpenSSH and X
Openssh-clients.x86_64: An open source SSH client applications
Openssh-ldap.x86_64: a ldap support for open source SSH server daemon
Openssh-server.x86_64: An open source SSH server daemon
Pam_ssh_agent_auth.i686: PAM module for authentication with ssh-agent
Pam_ssh_agent_auth.x86_64: PAM module for authentication with ssh-agent
Trilead-ssh2.noarch: SSH-2 protocol implementation in pure Java
Trilead-ssh2-javadoc.noarch: Javadoc for trilead-ssh2
Jsch. noarch: Pure Java implementation of SSH2
Python-paramiko.noarch: A SSH2 protocol library for python
Python-twisted-conch.x86_64: SSH and SFTP protocol implementation
Together with clients and servers

Name and summary matches only, use "search all" for everything.
From the above we can see that openssh-server, this is the name of the program we need to install.
What if you are a Ubuntu platform? It doesn't matter. You can run the following command to achieve the same effect as above.

[Root @ localhost ~] # Apt-get update // This line can be left empty
[Root @ localhost ~] # Apt-cache search ssh
Next we will list the startup status of the ssh service sshd at various execution levels:

[Root @ localhost ~] # Chkconfig -- list sshd
Sshd 0: off 1: off 2: off 3: off 4: off 5: off 6: off
Run the following command to manually start the sshd service (root permission required:

[Root @ localhost ~] #/Etc/init. d/sshd start
Generating SSH1 RSA host key: [OK]
Generating SSH2 RSA host key: [OK]
Generating SSH2 DSA host key: [OK]
Starting sshd: [OK]
In this way, you can log on to this Linux machine in putty or another client. To stop the ssh service, run the following command:

[Root @ localhost ~] #/Etc/init. d/sshd stop
Stopping sshd: [OK]

Complete SSH service configuration and troubleshooting in Ubuntu

Install Git, SSH, and Permission denied in Ubuntu 12.04

Offline installation of OpenSSH in Ubuntu 12.10

Install or set SSH in Ubuntu

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.