Linux Basics (6)

Source: Internet
Author: User
Tags scp download server port ssh server

One, temporary configuration network (IP, gateway, DNS)

Ifconfig View Network Configuration

Modify the IP address ifconfig ens33 192.168. 255.129/

ENS33 nic name, 192.168. 255.129/24 is the IP address/subnet mask to configure

Two , Permanent configuration network (IP, gateway, DNS)

Ifconfig View Network Configuration

Modify the network configuration, save.

Third, for the machine in the cluster to set the hostname, the use of/etc/hosts file to resolve all the host names in their own cluster, the corresponding, the cluster configuration should be changed to use the host name of the way

Hostnamectl set-hostname python #设置主机名

Hostname #查看主机名

Host:

Ext. 1

Ext. 2

Ext. 3

Test

Enter the following command on the host

Enter the domain name separately in the webpage, PYTHON-WEB1,PYTHON-WEB2,PYTHON-WEB3, the test succeeds.

Iv. ssh login, scp upload, download, ssh key login, modify SSH server port to 8888 and then sign in and SCP test

SSH login: ssh+ domain name or IP address

SCP upload

SCP download

SSH secret key Login

Ssh-kengen #生成秘钥

ls/root/.ssh/#秘钥生成目录

ssh-copy-id-i + domain name #发送锁给服务机

Vim/etc/ssh/sshd_config #修改主机ssh端口为888

Systemctl Restart sshd #重启主机ssh服务

SSH + domain or IP address-P 888 #客户端使用主机名 + PORT login

SSH [email protected]+ domain name or IP address-P 888 #登录测试

V. Organize the bash command type to verify the priority of finding a command

Command interpreter Bash priority descending from left to right:

Alias>compound commands>function>build_in>hash> $PATH >error

Linux Basics (6)

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.