Quick installation and deployment of remote connection software SSH in Linux

Source: Internet
Author: User

SSH is divided into client and server.
A server is a daemon, typically a sshd process, running in the background and responding to requests from clients. Provides processing of remote requests, typically including public key authentication, key exchange, symmetric key encryption, and unsecured connections.
The client is typically an SSH process, plus other processes such as SCP, Slogin, and SFTP.
Working mechanism:
1. The client sends a connection request to the remote server
2. Server-side check the application package and IP address, and then the key to the SSH client;
3. The client then sends the key back to the server and establishes the connection from there.

Here we begin with the text:
First, the client
1. Install the client (client is not required)

The code is as follows:
# apt-get Install SSH

If the installation fails, install with the following command

The code is as follows:
# Apt-get Install Openssh-client

2. SSH Login (client)

The code is as follows:
$ ssh 192.168.159.128
$ ssh-l Weiyg 192.168.159.128
$ ssh weiyg@192.168.159.128

Second, the service side
1. Install Server

The code is as follows:
# Apt-get Install Openssh-server

2. Start the server

The code is as follows:
#/etc/init.d/ssh Stop #停止
#/etc/init.d/ssh Start #启动
#/etc/init.d/ssh Restart #重启

3. SSH configuration
Modify profile/etc/ssh/sshd_config and restart services

The code is as follows:
#/etc/init.d/ssh Restart

SSH default port is 22, if necessary, modify it yourself

The code is as follows:
Port 20

SSH default configuration is to allow root login, you can modify the configuration table to prevent it from logging on

The code is as follows:

Permitrootlogin No

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.