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)
If the installation fails, install with the following command
# Apt-get Install Openssh-client
2. SSH Login (client)
$ 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
# Apt-get Install Openssh-server
2. Start the server
#/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
SSH default port is 22, if necessary, modify it yourself
SSH default configuration is to allow root login, you can modify the configuration table to prevent it from logging on
Permitrootlogin No