您的位置:首页 > 运维架构 > Linux

linux学习笔记-如何使用secureCRT连接虚拟机中linux

2017-02-22 22:22 633 查看

1.使用命令:

#vi /etc/sysconfig/network-scripts/ifcfg-eth0 [编辑网卡的配置文件]

2.修改文件中的以下内容:

BOOTPROTO=static

IPADDR=192.168.100.16
PREFIX=255.255.255.0
GATEWAY=192.168.100.1
ONBOOT=yes
DNS1=
192.168
.
1.1

//主DNS服务器IP地址为windows中主机真实网关



3.使用命令:
#service iptables stop#关闭防火墙(可选)
#chkconfig iptables off#设置防火墙不自动开启(可选)
#service network restart#重启网络



一般来讲,经过以上3步就可以连接上了。
注:
连接错误1:The remote system refused the connection.
解决:使用命令:#vi / etc/ssh/sshd_config
找到里面的
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
把前面的注释去掉,再使用命令:#/etc/init.d/sshd restart
连接错误2:Connection Timeout
解决:如果IP等已经设置正确,则使用命令:#service iptables stop
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: