I will leave it as a memorandum for myself, but I will exchange it with some explanation. The commands used will be described more and more, so I will update them from time to time.
This is a file transfer command between remote hosts that can ssh.
The first is to upload the file remotely to the server to which you are connecting to ssh. If you have an ssh connection, please disconnect.
# scp xxx.txt root@<ip address>:/tmp
//of the root user/xxx in the tmp directory.Upload txt
Next is how to download the file from the ssh connection.
# scp root@<ip address>: /tmp/xxx.txt /Users/Admin/Desktop
//xxx in the tmp directory.Put the txt file on the desktop(Mac)
I edited the file because I wanted to fix the IP address of CentOS on ESXi.
# ls /etc/sysconfig/network-scripts/
ifcfg-ens160     ifdown-eth   ifdown-routes  ifup-aliases  ifup-plip    ifup-tunnel
ifcfg-lo         ifdown-ippp  ifdown-sit     ifup-bnep     ifup-plusb   ifup-wireless
ifdown           ifdown-ipv6  ifdown-tunnel  ifup-eth      ifup-post    init.ipv6-global
ifdown-Team      ifdown-isdn  ifup           ifup-ippp     ifup-ppp     network-functions
ifdown-TeamPort  ifdown-post  ifup-Team      ifup-ipv6     ifup-routes  network-functions-ipv6
ifdown-bnep      ifdown-ppp   ifup-TeamPort  ifup-isdn     ifup-sit
#vim /etc/sysconfig/network-scripts/ifcfg-ens16
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static" #dhcp->static //Change
IPADDR=192.168.1.96 #add //add to
NETMASK=255.255.255.0 #add //add to
GATEWAY=192.168.1.1 #add //add to
DNS1=192.168.1.1 #add //add to
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens160"
UUID="53806499-7069-49cb-a15c-fd7e9eb89809"
DEVICE="ens160"
ONBOOT="yes"
#service network restart
//Restart service
#semanage port --add --type ssh_port_t --proto tcp xxx
// ssh_port_Added port xxx to t type(Protocol is tcp)
        Recommended Posts