Linux rookie starter process and knowledge about SSH

Source: Internet
Author: User



Openssh-server

Pstree View Initialization

Systemctl


Review and management of processes

1.systemd

System Initialization program, the first process started by the system,pid=1

2.systemctl command

Systenctl list-units List The status of the current system service

Systenctl List-unit-files lists the service's boot status

Systenctl status sshd View the state of the specified service

Systenctl stop sshd shuts down the specified service

Systenctl start sshd to start the specified service

Restart

Systenctl enable sshd to set the specified service to start

Systenctl Disable sshd settings specify service shutdown

Systenctl Reload SSHD enables the specified service to reload the configuration

Systenctl list-dependencies sshd View dependent relationships for specified services

Systenctl Mask sshd freezes the specified service

Systenctl unmask sshd Enable service

3. Service status.

Systemctl Status Service Mingcheng

The loaded system service has been initialized, loaded with

Active (running) service is being exploited by the system

The active (exited) service has already loaded the configuration, waiting for the system to exploit

Learning of Openssh-server Services

1.openssh-server

function: Allow remote host to access SSHD service over the network, start a secure shell

rm-fr/root/.ssh/

2. Client connection mode.

SSH remote host user @ remote host IP

Need to establish authentication relationship when connecting unfamiliar host

Remote user Password

SSH remote host user @ remote host Ip-x

Commond

3.sshkey encryption

①. Generating the public key private key

Ssh-keygen

Ls/root/.ssh

Id_rsa

Id_rsa.pub

②. Adding key authentication Methods

Ssh-copy-id-i/root/.ssh/id_rsa.pub [email protected]

③. Distributing keys

Scp/root/.ssh/id_rsa Root:/root/.ssh

④. Testing

4. Improve the OpenSSH security level

Openssh-server configuration file

/etc/ssh/sshd_config

78 Line setting Change to No: password logon is not allowed for improved security

Sysemctl Restart Sshd.service


This article from the "12147236" blog, reproduced please contact the author!

Linux rookie starter process and knowledge about 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.