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