First, Linux configuration network card
1) Get IP automatically
If the DHCP client uses dhclient to obtain an IP address
2) Manual Configuration
[[email protected] ~] #ifconfig #查看ip地址
[[email protected] ~] #vim/etc/sysconfig/network-scripts/ifcfg-eth0 #打开网卡配置文件
Modify the following:
Onboot=no Change to Yes #开机启动
BOOTPROTO=DHCP changed to static #自动获得改成静态获得
To add a row:
ipdaar=192.168.x.x #桥接模式下与真机一个ip地址
netmask=255.255.255.0 #子网掩码
gateway=192.1.1.1 #网关地址
Peerdns=no #防止dhcp修好dns
dns1=8.8.8.8 #DNS地址
dns2=4.4.4.4 #DNS地址
[[email protected] ~] #cat/etc/resolv.conf #查看dns是否生效
[[email protected] ~]#/etc/init.d/network restart
[[email protected] ~] #service network restart #重启网卡
Two, putty key login
1) Create a. SSH directory under the user's home directory [[email protected] ~] #mkdir./ssh
2) Create the Authorized_keys file in the. SSH directory [[email protected] ~] #touch./ssh/authorized_keys
3) Modify the. SSH directory permission to 700, file Authourizd_keys to 600
4) Use Puttygen to generate key pair to save private key to copy public key to file Authorized_keys
5) Shut down the firewall [[email protected] ~] #setenforce 0 (temporarily off) permanently close edit /etc/selinux/config
Change inside selinux=enforcing to Disabled
6) Open Putty Save private key to SSH auth in session, open
This article is from the "Linux" blog, so be sure to keep this source http://1038457789.blog.51cto.com/10025869/1627971
Linux learning NIC configuration Putty key Login