Alias alias alias alias permanent permanent; the NAT mode virtual machine, static IP configuration, and A, B, to achieve free access secret

Alias ​​alias permanent

1. Open a new file directory cd /etc/profile.d my_alias.sh

2.my_alias.sh which added alias p = 'poweroff -h' alias r = 'reboot'

3. After saving, source /etc/profile.d/my_alias.sh

NAT mode virtual machine, static IP configuration, and A, B, to achieve free access secret

1. ip subnet read: 192.168.100.221

wps78_thumb[1]

2. Switch the root user to modify the configuration file, centos A ip with 192.168.153.221, reboot card

Modify the configuration file: vi / etc / sysconfig / network -scripts / ifcfg-ens33
restart card: systemctl restart network.service

wps79_thumb[2]

3. Start two virtual network adapter, network connectivity testing the ping www.baidu.com

image_thumb[3]

Command window to restart the network card: ifup ens33

Remote-free access secret

1. The key generating centosA and B, shell input: ssh-keygen -t rsa been press Enter
wps1_thumb[2]

wps2_thumb[1]
2. The public key is sent to another server

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

wps3_thumb[1]
wps4_thumb[1]
3. Review the authorized_keys file

wps5_thumb[1]
4.ssh connection 192.168.174.133, avoid close a successful login

wps6_thumb[1]

Guess you like

Origin www.cnblogs.com/gdf456/p/12010485.html