Daemon and Telnet Server

Source: Internet
Author: User
Tags scp command

1. In the red HAT7 version, the system startup and server processes are managed by SYSTEMD

The SYSTEMCTL command is used to manage various types of SYSTEMD objects, which are called units.

Systemctl-t Help displays a list of available cell types.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/81/F1/wKioL1dGKWahqH6JAAAsZ25pcXA048.png "title=" Qq20160526063403.png "alt=" Wkiol1dgkwahqh6jaaasz25pcxa048.png "/>

Some common unit types are:

(1). Service Unit has a. service extension

(2). Socket cells have a. socket extension

(3). Path units have a. path extension

2. Common commands

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/81/F1/wKioL1dGKqTC9bDXAACZn_oOw9k769.png "title=" Qq20160526063911.png "alt=" Wkiol1dgkqtc9bdxaaczn_oow9k769.png "/>


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/81/F1/wKioL1dGK1bAfJdAAAAsM2nfsYc459.png "title=" Qq20160526064231.png "alt=" Wkiol1dgk1bafjdaaaasm2nfsyc459.png "/>


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/81/F1/wKioL1dGK7bwqDL4AABRqicNUzM615.png "title=" Qq20160526064403.png "alt=" Wkiol1dgk7bwqdl4aabrqicnuzm615.png "/>


Common Systemctl control commands:

Command Explain
Systemctl Stop UNIT Stop a service
Systemctl Start UNIT Start a service
Systemctl Restart UNIT Restart Service
Systemctl Reload Unit Reload the service's configuration file
Systemctl Mask UNIT Disabling services
Systemctl unmask UNIT Service becomes available
Systemctl Enable UNIT Boot auto Start
Systemctl Disable UNIT Prevent Service from starting
Systemctl list-dependencies UNIT List dependencies for a specified cell


3. Configure and Telnet to the server

(1). W-F Displays the list of users currently logged on to the computer

(2). Key-based login: SSH user name @ip

Ssh-keygen : Generate private key pair, private key file: ~/.ssh/idrsa Public key file: ~/.ssh/idrsa.

(3). ssh-copy-id-i ~/.ssh/id_rsa.pub user name @ip : Copies the public key to the remote server, and the public key information is saved to the appropriate user's ~/.ssh/authorized_keys file on the remote server In

Through the above three steps, the next SSH user name @ip can not enter the password, the key-based login.

Custom SSH Service configuration:

sshd configuration file:/etc/ssh/sshd_config.

You can set only allow the root user to log in to SSH, or you can set only allow root based on secret key login ..., but must restart after Setup: Systemctl restart sshd


4. SCP command: Local file copy to remote/remote file transfer Local

SCP local file path user name @ip: The path to be stored

SCP User name @ip: file path this confidential file path

Note: Copy the entire directory:-r recursive copy.

Learn: SFTP uses SSH encrypted file transfer, secure SFTP user @ip

rsync Remote Sync Files:

Options Explain
-R Synchronizing the entire Directory
-L Synchronizing Symbolic Links
-P Preserve file permissions
-T Keep file timestamp information
-G Preserve file group ownership
-O Keep File Owners

Daemon and Telnet Server

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.