openwrt 直接 web 界面升级成功后,网络已经可以访问,但是 ssh 登陆的时候貌似账号密码不对,telnet 直接无法连接,这是怎么回事?要如何解决?

2014-11-18 12:59:43 +08:00
 nonozone
9236 次点击
所在节点    问与答
19 条回复
TheCure
2014-11-18 13:57:18 +08:00
删除~/.ssh/known_hosts
Jays
2014-11-18 14:01:34 +08:00
重来一次 , 我的到货后一天重刷了4次
nonozone
2014-11-18 14:13:28 +08:00
@Jays 怎么重来...升级完是没有web界面的...
@callofmx win系统

实在不想碰维护模式啊...
jemyzhang
2014-11-18 14:33:14 +08:00
密码和你web界面的密码是一样的
nonozone
2014-11-18 14:37:18 +08:00
@jemyzhang 我知道...我把所有的密码都试过了...
hellov22ex
2014-11-18 15:18:04 +08:00
一旦设定了密码后telnet自动失效,只能ssh链接上去,我用的是Xshell4链接的,账号密码为你web页面的登陆账号密码,即root和密码
ooxxcc
2014-11-18 15:23:09 +08:00
把ssh的提示贴出来

我猜是因为主机公钥改变导致客户端拒绝连接
nonozone
2014-11-18 15:52:52 +08:00
@ooxxcc 输入密码的被拒绝。
nonozone
2014-11-18 16:48:18 +08:00
@ooxxcc

root@debian ~# ssh root@192.168.10.1
root@192.168.10.1's password:
Connection to 192.168.10.1 closed.
nonozone
2014-11-18 16:51:37 +08:00
如果用putty打开的时候,输入账号root之后,提示输入密码,输完,窗口就自动关闭了。
ooxxcc
2014-11-18 17:33:31 +08:00
@nonozone ssh -4Cv试试……感觉是没跑起来shell?奇怪
ooxxcc
2014-11-18 17:34:24 +08:00
@nonozone 1.密码是对的,2.不是路由器公钥的问题,不清楚怎么一回事
MerlinYang
2014-11-19 09:12:21 +08:00
putty能记录所有返回信息,看下
nonozone
2014-11-19 09:52:04 +08:00
@MerlinYang 记录在哪里?哪个文件?反正输入密码,putty直接 关闭了。
nonozone
2014-11-19 09:56:06 +08:00
@ooxxcc 这样

root@debian:~# ssh -4Cv root@192.168.10.1
OpenSSH_6.0p1 Debian-4+deb7u2, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.10.1 [192.168.10.1] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version dropbear_2014.65
debug1: no match: dropbear_2014.65
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA c9:14:9c:42:23:1f:0b:99:39:58:80:38:c2:5c:b2:85
debug1: Host '192.168.10.1' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Next authentication method: password
root@192.168.10.1's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.10.1 ([192.168.10.1]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to 192.168.10.1 closed.
Transferred: sent 2280, received 1176 bytes, in 0.0 seconds
Bytes per second: sent 222701.2, received 114866.9
debug1: Exit status 1
ooxxcc
2014-11-19 10:08:12 +08:00
ssh过程是正常的,不过路由器上的shell坏了似乎……其他不清楚了
nonozone
2014-11-19 10:42:07 +08:00
@ooxxcc 那要咋办?只能维护模式强制重置密码了么?
aboutboy
2017-04-05 17:46:50 +08:00
这个问题我这两天刚接触 openwrt 也遇到了。刷机后如果遇到 ssh 输入正确的密码却无法登录的情况,可以重启一下路由器,再 ssh 就可以了。具体原因我还没找到。
pennguo
2017-07-26 03:38:18 +08:00
网页登录用户名和密码都设置 root,路由器断电,重启后 SSH 就可以登陆啦。(记得用网页登录用户名和密码)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/147422

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX