首页
社区
课程
招聘
[求助]有关ssh的问题
发表于: 2016-8-28 20:22 4012

[求助]有关ssh的问题

2016-8-28 20:22
4012
本人在测试一个网络环境,里面包含了一个路由器(使用gns3 模拟的 cisco-c3725)。结果是,该路由器其他配置都起来了,但就是 ssh 没起来.......具体如下:

1、网络环境:
Ubuntu Instance(主机):
	1 Bridged Adapter: DHCP
	1 Host Only Adapter: DHCP (Private Network)

Windows 7 Instance(虚拟机1): 
	1 Host Only Adapter: 
		IP: 192.168.100.10
		Netmask: 255.255.255.0
		Gateway: 192.168.100.1
		DNS: 8.8.8.8

Kali Linux Instance(虚拟机2):
	1 Bridged Adapter:
		IP: 192.168.1.90
		Netmask: 255.255.255.0
		Gateway: 192.168.1.1

Network Gateway:
	IP: 192.168.1.1
        Netmask: 255.255.255.0	


2、在主机(Ubuntu Instance)中 使用 gns3 模拟 cisco路由器(c3725-adventerprisek9-mz.124-15.T14.bin),配置的脚本如下(startup-config):
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
hostname ghh-r1
boot-start-marker
boot-end-marker
enable secret 5 $1$E.2N$6HDnuNoWYNF7jfimzBtV4/
aaa new-model
aaa authentication login default local
aaa authorization config-commands
aaa authorization exec default local 
aaa session-id common
memory-size iomem 5
ip cef
ip domain name ghh.local
multilink bundle-name authenticated
username test password 7 08114D5D1A0E5505164A
username admin privilege 15 secret 5 $1$m9RP$WMBDl2prhisVK6bQ14Ujs0
archive
 log config
  hidekeys
ip ssh time-out 60
ip ssh authentication-retries 5
interface FastEthernet0/0
 ip address 192.168.1.250 255.255.255.0
 duplex auto
 speed auto
interface FastEthernet0/1
 ip address 192.168.100.1 255.255.255.0
 duplex auto
 speed auto
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
ip default-gateway 192.168.100.1
ip default-network 192.168.1.0
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip http server
ip http authentication aaa
no ip http secure-server
snmp-server community public RO
snmp-server community secret RW
route-map priv permit 0
control-plane
line con 0
line aux 0
line vty 0 4
 transport input ssh
end


3、在启动路由器后,使用kali(192.168.1.90)ping 路由器的其中一块网卡(192.168.1.250)时是通的,然后使用 nmap 扫描路由器的端口,具体如下:
root@kali:~# nmap -A 192.168.1.250

Starting Nmap 7.25BETA1 ( 2daK9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6F1L8h3q4H3i4K6u0W2L8%4u0Y4 ) at 2016-08-28 20:18 CST
mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap scan report for 192.168.1.250
Host is up (0.0026s latency).
Not shown: 999 closed ports
PORT   STATE SERVICE VERSION
80/tcp open  http    Cisco IOS http config
| http-auth: 
| HTTP/1.1 401 Unauthorized
|_  Basic realm=level_15 or view_access
|_http-server-header: cisco-IOS
|_http-title: Site doesn't have a title.
MAC Address: C2:02:0C:EF:00:00 (Unknown)
OS details: Cisco 836, 890, 1751, 1841, 2800, or 2900 router (IOS 12.4 - 15.1), Cisco Aironet 1141N (IOS 12.4) or 3602I (IOS 15.3) WAP
Network Distance: 1 hop
Service Info: OS: IOS; CPE: cpe:/o:cisco:ios

TRACEROUTE
HOP RTT     ADDRESS
1   2.58 ms 192.168.1.250

OS and Service detection performed. Please report any incorrect results at 34dK9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6F1L8h3q4H3i4K6u0W2L8%4u0Y4i4K6u0r3M7%4g2T1L8h3W2@1i4K6u0r3 .
Nmap done: 1 IP address (1 host up) scanned in 18.83 second


问题:
上面 nmap 的扫描结果为何没有 ssh 的端口(端口号:22)?

[培训]科锐逆向工程师培训第53期2025年7月8日开班!

收藏
免费 0
支持
分享
最新回复 (7)
雪    币: 74
活跃值: (25)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
................................................................................
2016-8-28 20:29
0
雪    币: 1865
活跃值: (913)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
不知道是不是连接密码的问题
2016-8-28 21:18
0
雪    币: 74
活跃值: (25)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
??能说的详细点吗?具体 startup-config 文件里面的哪个配置出问题?
2016-8-29 08:16
0
雪    币: 1753
活跃值: (1075)
能力值: ( LV8,RANK:120 )
在线值:
发帖
回帖
粉丝
5
你 192.168.1.250 这个ssh起起来了么~?
1.250 上执行lsof -ni:22 看看你这个端口是否有开放,是否能远程连接上
2016-8-29 09:57
0
雪    币: 74
活跃值: (25)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
我登陆不上去....
ssh test@192.168.1.250
ssh: connect to host 192.168.1.250 port 22: Connection refused
2016-8-30 09:46
0
雪    币: 74
活跃值: (25)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
这是gns3里c3725启动后 console 的输出截图:

上传的附件:
2016-8-30 12:22
0
雪    币: 1753
活跃值: (1075)
能力值: ( LV8,RANK:120 )
在线值:
发帖
回帖
粉丝
8
[QUOTE=安wlaq;1442996]我登陆不上去....
ssh test@192.168.1.250
ssh: connect to host 192.168.1.250 port 22: Connection refused
[/QUOTE]

很明显连接被重置了啊
要么··你1.250的22端口没开··要么被防火墙拦截了~╮(╯▽╰)╭
2016-9-1 16:43
0
游客
登录 | 注册 方可回帖
返回