6 月 252014
 

oss-server-minimal-install-00oss-server-minimal-installoss-server-minimal-install-02 oss-server-minimal-install-03 oss-server-minimal-install-04 oss-server-minimal-install-05

查看网卡配置信息,默认为从DHCP自动获得IP地址
linux-o2qn:~ # cat /etc/sysconfig/network/ifcfg-eth0
BOOTPROTO=’dhcp’
BROADCAST=”
ETHTOOL_OPTIONS=”
IPADDR=”
MTU=”
NAME=’Ethernet Card 0′
NETMASK=”
NETWORK=”
REMOTE_IPADDR=”
STARTMODE=’auto’
USERCONTROL=’no’
linux-o2qn:~ #

查看接口IP信息
linux-o2qn:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:23:36:5F
inet addr:192.168.2.233 Bcast:192.168.3.255 Mask:255.255.252.0
inet6 addr: fe80::5054:ff:fe23:365f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:165825 errors:0 dropped:29991 overruns:0 frame:0
TX packets:17858 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41686835 (39.7 Mb) TX bytes:1926372 (1.8 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

linux-o2qn:~ #

启动SSHD服务并查看服务运行状态
linux-o2qn:~ # rcsshd start
linux-o2qn:~ # rcsshd status |grep Active
Active: active (running) since Wed 2014-06-25 04:11:16 CST; 1h 23min ago
linux-o2qn:~ #
linux-o2qn:~ # netstat -ltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
linux-o2qn:~ #

远程登录SSH无法成功
harveymei@linux-7zyd:~> ssh root@192.168.2.233
ssh: connect to host 192.168.2.233 port 22: Connection timed out
harveymei@linux-7zyd:~>

修改防火墙配置文件,设置允许从外部网络访问的TCP服务端口号或名称
linux-o2qn:~ # vi /etc/sysconfig/SuSEfirewall2
## Type: string
#
# Which TCP services _on the firewall_ should be accessible from
# untrusted networks?
#
# Format: space separated list of ports, port ranges or well known
# service names (see /etc/services)
#
# Examples: “ssh”, “123 514”, “3200:3299”, “ftp 22 telnet 512:514″
#
# Note: this setting has precedence over FW_SERVICES_ACCEPT_*
#
FW_SERVICES_EXT_TCP=””

修改为以下内容
FW_SERVICES_EXT_TCP=”22″
重启防火墙并查看防火墙运行状态
linux-o2qn:~ # rcSuSEfirewall2 restart
linux-o2qn:~ # rcSuSEfirewall2 status
SuSEfirewall2.service – SuSEfirewall2 phase 2
Loaded: loaded (/usr/lib/systemd/system/SuSEfirewall2.service; enabled)
Active: active (exited) since Wed 2014-06-25 03:18:47 HKT; 4s ago
Process: 5562 ExecStop=/usr/sbin/SuSEfirewall2 systemd_stop (code=exited, status=0/SUCCESS)
Process: 5644 ExecStart=/usr/sbin/SuSEfirewall2 boot_setup (code=exited, status=0/SUCCESS)
Main PID: 5644 (code=exited, status=0/SUCCESS)

Jun 25 03:18:47 linux-o2qn systemd[1]: Starting SuSEfirewall2 phase 2…
Jun 25 03:18:47 linux-o2qn SuSEfirewall2[5650]: Setting up rules from /etc/sysconfig/SuSEfirewall2 …
Jun 25 03:18:47 linux-o2qn SuSEfirewall2[5714]: Firewall rules successfully set
Jun 25 03:18:47 linux-o2qn systemd[1]: Started SuSEfirewall2 phase 2.
linux-o2qn:~ #

再次尝试远程登录SSH服务
harveymei@linux-7zyd:~> ssh root@192.168.2.233
Password:
Last login: Wed Jun 25 03:15:37 2014 from 192.168.1.37
Have a lot of fun…
linux-o2qn:~ #

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据