I seem to have locked myself out of my WRT54GS when I upgraded to the new version of dropbear, which apparently no longer looks at ~/.ssh/authorized_keys . As I disabled password logins before noticing the change in search path for authorized_keys, ssh now gives:
# ssh -l root -v 192.168.1.1
OpenSSH_4.2p1 FreeBSD-20050903, OpenSSL 0.9.7e-p1 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 192.168.1.1 [192.168.1.1] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version dropbear_0.45
debug1: no match: dropbear_0.45
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2p1 FreeBSD-20050903
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '192.168.1.1' is known and matches the DSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: ssh_dss_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/kirk/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
So, here's where I'm at. Nmap (with the router in "normal" mode) gives me these open ports:
PORT STATE SERVICE
22/tcp open ssh
80/tcp closed http
161/tcp closed snmp
In failsafe mode, I have:
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
676/tcp open unknown
2049/tcp open nfs
It looks like it wants to let me mount part of it as an NFS share - boy, that would be handy right about now - but I've tried all the mount_nfs variations I can thing of with no success:
# mount 192.168.1.1:/ /tmp/foo
[udp] 192.168.1.1:/: Permission denied
So, does anyone have any great ideas about how I can re-enable password authentication so that I can get back into the little box? In the worst case, my sheer luck I happened to use rsync to make a backup of /etc immediately before the fatal reboot locked me out, so having to revert to a re-install shouldn't be too incredibly painful.
