Can't access the server via SSH (320L)

757 views
Skip to first unread message

Sia Nariman

unread,
Dec 20, 2015, 1:55:08 PM12/20/15
to Alt-F

Hi, can't access the server via SSH anymore. Root password working fine on the webinterface but not via terminal!

ssh -l root 192.168.1.112


The authenticity of host '192.168.1.112 (192.168.1.112)' can't be established.


RSA key fingerprint is 7f:e4:ab:4b:1e:3d:d5:99:04:0b:09:c0:c9:b3:24:6c.


Are you sure you want to continue connecting (yes/no)? yes


Warning: Permanently added '192.168.1.112' (RSA) to the list of known hosts.


ro...@192.168.1.112's password:


Permission denied, please try again.



Regards
Sia

João Cardoso

unread,
Dec 20, 2015, 4:34:19 PM12/20/15
to Alt-F


On Sunday, 20 December 2015 18:55:08 UTC, Sia Nariman wrote:

Hi, can't access the server via SSH anymore. Root password working fine on the webinterface but not via terminal!

What does the System Log says? (System->Utilities->View Logs, System Log, search for 'dropbear' or ssh)
Can other users login?
Have you tried to *telnet* on port 26 (root login, no password asked) after pressing the USB (or reset) button for *more* than 10 (but *less* than 20) seconds?

Sia Nariman

unread,
Dec 20, 2015, 4:58:42 PM12/20/15
to Alt-F
Hi, with Telnet without password working fine. 

telnet 192.168.1.112


Trying 192.168.1.112...


Connected to 192.168.1.112.


Escape character is '^]'.


dns325 login: root


COLUMNS=80;LINES=24;export COLUMNS LINES;


[root@dns325]# ls


[root@dns325]# cd ../../../


[root@dns325]# ls


Alt-F       README.txt  etc         media       rootmnt     usr


COPYING     bin         ffp         mnt         sbin        var


LICENSE     boot        init        proc        sys


Public      dev         lib         root        tmp


and in the logs is started actually:
Dec 20 20:48:52 dns325 daemon.info avahi-daemon[421]: Service "dns325" (/etc/avahi/services/ssh.service) successfully established.


Thanks
Sia

Sia Nariman

unread,
Dec 20, 2015, 5:17:41 PM12/20/15
to Alt-F
the access log showing blank password:
Dec 20 22:14:10 dns325 authpriv.info dropbear[3453]: Child connection from 192.168.1.142:57378
Dec 20 22:14:11 dns325 authpriv.warn dropbear[3453]: User 'root' has blank password, rejected
Dec 20 22:14:12 dns325 authpriv.warn dropbear[3453]: User 'root' has blank password, rejected
Dec 20 22:14:15 dns325 authpriv.warn dropbear[3453]: User 'root' has blank password, rejected
Dec 20 22:14:15 dns325 authpriv.info dropbear[3453]: Exit before auth (user 'root', 3 fails): Exited normally



On Sunday, December 20, 2015 at 10:34:19 PM UTC+1, João Cardoso wrote:

Joao Cardoso

unread,
Dec 20, 2015, 7:01:26 PM12/20/15
to Alt-F Group


On Dec 20, 2015 10:17 PM, "Sia Nariman" <sia.n...@gmail.com> wrote:
>
> the access log showing blank password:

I suspect the box is missing /etc/passwd and /etc/group, verify and try to load from saved settings

> --
> You received this message because you are subscribed to the Google Groups "Alt-F" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+un...@googlegroups.com.
> Visit this group at https://groups.google.com/group/alt-f.
> For more options, visit https://groups.google.com/d/optout.

Sia Nariman

unread,
Dec 20, 2015, 7:09:06 PM12/20/15
to Alt-F
No, they're there and can't load any settings because is nothing saved from me!

Joao Cardoso

unread,
Dec 20, 2015, 9:17:44 PM12/20/15
to Alt-F Group


On Dec 21, 2015 12:09 AM, "Sia Nariman" <sia.n...@gmail.com> wrote:
>
> No, they're there
Non empty? What are their contents?

and can't load any settings because is nothing saved from me!

Never? Not even in the box flash  when the red "save settings" warning appears?!
In Settings, Flash memory section, can't you select and load one?

Sia Nariman

unread,
Dec 21, 2015, 4:38:27 AM12/21/15
to Alt-F


On Monday, December 21, 2015 at 3:17:44 AM UTC+1, Joao Cardoso wrote:


On Dec 21, 2015 12:09 AM, "Sia Nariman" <sia.n...@gmail.com> wrote:
>
> No, they're there
Non empty? What are their contents?


[root@dns325]# cat /etc/passwd


root:x:0:0:root:/root:/bin/sh


daemon:x:1:1:daemon:/usr/sbin:/bin/sh


bin:x:2:2:bin:/bin:/bin/sh


sys:x:3:3:sys:/dev:/bin/sh


sync:x:4:100:sync:/bin:/bin/sync


at:x:5:8:at Daemon:/home/at:/bin/sh


#dbus 6


ftp:x:7:7:FTP User:/var/run/vsftpd:/bin/sh


mail:x:8:8:mail:/var/spool/mail:/bin/sh


#cups 9


#ushare 10


#minidlna 11


#fuppes 12


#transmission 13


#mediatomb 14


#mt-daapd 15


#forked-daapd 16


#automatic 17


#sickbeard 18


#sabnzbd 19


#couchpotato 20


#nzbget 21


#couchpotato2 22


#mpd 23


#davfs2 24


#www-data:x:33:33:www-data:/var/www:/bin/sh


backup:x:34:34:backup:/var/backups:/bin/sh


#lighttpd 35


sshd:x:67:67:SSHD User:/var:/bin/sh


#avahi 68


#ups 69


nobody:x:99:98:nobody:/home:/bin/sh


avahi:x:68:68:avahi daemon:/var/lib/avahi:/bin/false


dbus:x:6:3:DBUS daemon:/var/lib/dbus:/bin/false


minidlna:x:11:80:minidlna daemon:/var/lib/minidlna:/bin/false


transmission:x:13:201:Transmission daemon:/var/lib/transmission:/bin/false


daapd:x:16:80:forked-daapd daemon:/var/lib/daapd:/bin/false


[root@dns325]# cat /etc/group


root:x:0:


daemon:x:1:


bin:x:2:


sys:x:3:dbus


adm:x:4:


tty:x:5:


disk:x:6:


ftp:x:7:


at:x:8:


#lpadmin 9


backup:x:34:


utmp:x:43:


sshd:x:67


#avahi 68


#multimedia 80


#network        81


netdev:x:82:


#nut 84


nobody:x:98:


nogroup:x:99:


users:x:100:


#TV 200


#BT 201


#davfs2 202


avahi:x:68:avahi


multimedia:x:80:minidlna,daapd


BT:x:201:transmission


[root@dns325]#


 

and can't load any settings because is nothing saved from me!

Never? Not even in the box flash  when the red "save settings" warning appears?!
In Settings, Flash memory section, can't you select and load one?

No never. I've fixed the ssh login with ssh-keygan. Just copied id_rsa.pub to root/.ssh/authorized_keys. Now login working fine without password. 

Regards
Sia

João Cardoso

unread,
Dec 21, 2015, 12:18:25 PM12/21/15
to Alt-F


On Monday, 21 December 2015 09:38:27 UTC, Sia Nariman wrote:


On Monday, December 21, 2015 at 3:17:44 AM UTC+1, Joao Cardoso wrote:


On Dec 21, 2015 12:09 AM, "Sia Nariman" <sia.n...@gmail.com> wrote:
>
> No, they're there
Non empty? What are their contents?


[root@dns325]# cat /etc/passwd


root:x:0:0:root:/root:/bin/sh

daemon:x:1:1:daemon:/usr/sbin:/bin/sh

... 

daapd:x:16:80:forked-daapd daemon:/var/lib/daapd:/bin/false


[root@dns325]# cat /etc/group


root:x:0:

daemon:x:1:

... 

BT:x:201:transmission


[root@dns325]#


So it seems that somehow the root password disappear?
You didn't reply if you were able to login as other user other than root. This is because the actual (hashed)  passwords are stored in /etc/shadow, and we need to determine where the issue is.
As /etc/passwd and /etc/group are OK, and assuming that /etc/shadow is also OK, solving the root password is simple, just use the 'passwd' command.
If however /etc/shadow is nonexistent of corrupted, you have to reenter all users passwords by using the 'passwd <username>' command (or changing the users password from within the Setup->Users webUI.

The solution you found, setting ssh for password-less logins, might be temporary, as the contents of /root will vanish after a reboot. For setting that you need to use the "boot user script" under Services->User, user. The "how to customise" wiki contains a few examples on how to setup that script.
If the /root folder (and its .ssh sub-folder) does not disappears after a reboot, then it is under /Alt-F/root and you will have *real* *trouble* with the next firmware upgrade!

...

Sia Nariman

unread,
Dec 21, 2015, 1:05:56 PM12/21/15
to Alt-F


On Monday, December 21, 2015 at 6:18:25 PM UTC+1, João Cardoso wrote:


On Monday, 21 December 2015 09:38:27 UTC, Sia Nariman wrote:


On Monday, December 21, 2015 at 3:17:44 AM UTC+1, Joao Cardoso wrote:


On Dec 21, 2015 12:09 AM, "Sia Nariman" <sia.n...@gmail.com> wrote:
>
> No, they're there
Non empty? What are their contents?


[root@dns325]# cat /etc/passwd


root:x:0:0:root:/root:/bin/sh

daemon:x:1:1:daemon:/usr/sbin:/bin/sh

... 

daapd:x:16:80:forked-daapd daemon:/var/lib/daapd:/bin/false


[root@dns325]# cat /etc/group


root:x:0:

daemon:x:1:

... 

BT:x:201:transmission


[root@dns325]#


So it seems that somehow the root password disappear?
You didn't reply if you were able to login as other user other than root. This is because the actual (hashed)  passwords are stored in /etc/shadow, and we need to determine where the issue is.
As /etc/passwd and /etc/group are OK, and assuming that /etc/shadow is also OK, solving the root password is simple, just use the 'passwd' command.
If however /etc/shadow is nonexistent of corrupted, you have to reenter all users passwords by using the 'passwd <username>' command (or changing the users password from within the Setup->Users webUI.

The solution you found, setting ssh for password-less logins, might be temporary, as the contents of /root will vanish after a reboot. For setting that you need to use the "boot user script" under Services->User, user. The "how to customise" wiki contains a few examples on how to setup that script.
If the /root folder (and its .ssh sub-folder) does not disappears after a reboot, then it is under /Alt-F/root and you will have *real* *trouble* with the next firmware upgrade!

True, that way can fix it finally, thanks for help. Now is solved

Best
 
Reply all
Reply to author
Forward
0 new messages