配置ip
cd /etc/sysconfig/network-scripts
[root@localhost network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.199
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
或者输入setup命令进行配置
重启网络 network service restart
配置dns
# /etc/resolv.conf
# domain name resolver config file
domain syroidmanor.com
nameserver 192.168.1.1
启动ssh
查看是否安装ssh
rpm -qa|grep openssh
结果为 openssh-server-*, 表示已安装
启动sshd服务 /etc/rc.d/init.d/sshd start
其他机器上 ssh 192.168.1.199
如果无连接,则需要关闭防火墙
1) linux的防火墙 重启后永久性生效:
开启: chkconfig iptables on
关闭: chkconfig iptables off
2) 即时生效,重启后失效:
开启: service iptables start
关闭: service iptables stop