Root Password and SSH access

Moderators: Gully, peteru

Post Reply
grantc
Apprentice
Posts: 17
Joined: Mon Nov 16, 2015 00:25

Root Password and SSH access

Post by grantc » Wed Mar 29, 2017 12:14

Since the upgrade I have been unable to make a SSH connection - "packet _write_wait:Broken Pipe" is the error. Password is correct as I can connect via SMB as root.
Also trying to change the root password via the gui in the Settings/Network does not appear to work - using the random password change option works fine, but entering a password is not saved.

Thanks for your help

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Root Password and SSH access

Post by MrQuade » Wed Mar 29, 2017 12:18

grantc wrote:Since the upgrade I have been unable to make a SSH connection - "packet _write_wait:Broken Pipe" is the error. Password is correct as I can connect via SMB as root.
The password for Samba and SSH are not the same.

The root password (used by SSH) is blank/null with default settings. You should be able to log in as root and just press ENTER when asked for a password.

The Samba username/password of beyonwiz/beyonwiz is only required for accessing the root file share.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Root Password and SSH access

Post by prl » Wed Mar 29, 2017 12:42

SSH works just fine for me in the new firmware (tested on T2, T3 & T4). if root doesn't have a password. It fails with the error you posted if I set a root password and correctly authenticate with it. If I enable debugging in the SSH client, I can see that authentication succeeded, and if I give an incorrect password, it just asks for the password again.

SMB authentication is separate from SMB and Telnet authentication.

To enter a password manually in MENU>Setup>Network>Password, press BLUE Keyboard, enter the password there, GREEN to accept the password in the text entry panel, then GREEN Set Password in the main Password setup screen.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Root Password and SSH access

Post by prl » Wed Mar 29, 2017 12:47

MrQuade wrote:...
The root password (used by SSH) is blank/null with default settings. You should be able to log in as root and just press ENTER when asked for a password.
...
Yes, but if you set a password for root, connecting using ssh fails with "packet _write_wait:Broken Pipe" as grantc describes (though a bit more detail might have made the condition for the error more obvious).

Telnet authentication works just fine if there's a root password.

This looks like a server side ssh bug (or something weird in /etc/ssh/ssh_config, though I can't see anything untoward there).
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Root Password and SSH access

Post by MrQuade » Wed Mar 29, 2017 12:48

prl wrote:It fails with the error you posted if I set a root password and correctly authenticate with it. If I enable debugging in the SSH client, I can see that authentication succeeded, and if I give an incorrect password, it just asks for the password again.
Erk! That's not good!
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Root Password and SSH access

Post by prl » Wed Mar 29, 2017 12:54

Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

grantc
Apprentice
Posts: 17
Joined: Mon Nov 16, 2015 00:25

Re: Root Password and SSH access

Post by grantc » Wed Mar 29, 2017 13:37

Just an observation - with a root password set. Try to connect, press enter/blank password three times when prompted, should then prompt with "root@ip_address's password:" line, enter password and it authenticates fine.

User avatar
greenvomit8
Newbie
Posts: 5
Joined: Thu Jun 16, 2016 20:33

Re: Root Password and SSH access

Post by greenvomit8 » Fri Apr 14, 2017 09:34

grantc wrote:Just an observation - with a root password set. Try to connect, press enter/blank password three times when prompted, should then prompt with "root@ip_address's password:" line, enter password and it authenticates fine.
Wow grantc. I had exactly the same problem as you with the latest firmware on my T2 and your workaround works a treat.
Prior to this I even tried resetting my T2 back to factory settings but no success.
Strange thing I noticed was even after a factory reset the root password that I saved via MENU>Setup>Network>Password prior to the factory reset would work when connecting via SMB share.
Hopefully the SSH root access will be fixed with a later firmware update.
Thanks again grantc.

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Root Password and SSH access

Post by MrQuade » Fri Apr 14, 2017 09:40

greenvomit8 wrote: Strange thing I noticed was even after a factory reset the root password that I saved via MENU>Setup>Network>Password prior to the factory reset would work when connecting via SMB share.
Hopefully the SSH root access will be fixed with a later firmware update.
Thanks again grantc.
Yep that's right, a factory reset only really resets stuff to do with the PVR portions of the Wiz, but not stuff to do with the underlying operating system like the root password.

It's the same reason why the root password is not saved in your settings backup.

If you want to clear settings completely, then a USB firmware update is the way to go.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Root Password and SSH access

Post by prl » Thu Apr 20, 2017 15:43

grantc wrote:Just an observation - with a root password set. Try to connect, press enter/blank password three times when prompted, should then prompt with "root@ip_address's password:" line, enter password and it authenticates fine.
OK, there's a way around this: change the order of the authentication methods that the SSH client tries.

I'm not sure how to do this in GUI clients like PuTTY, but here's how it's done in the Unix command-line ssh (and scp).

In ~/.ssh/config, set up an entry to specify the authentication order. I also use this to automatically connect to the Beyonwizes as root.

A device-specific entry that does both looks like:

Code: Select all

Host beyonwizt4
        User                            root
        PreferredAuthentications        gssapi-with-mic,hostbased,publickey,password,keyboard-interactive
To do a global setting that just sets the authentication order looks like:

Code: Select all

Host *
        PreferredAuthentications        gssapi-with-mic,hostbased,publickey,password,keyboard-interactive
The ssh command's default authentication order is "gssapi-with-mic,hostbased,publickey,keyboard-interactive,password", so the change simply moved "password" before "keyboard-interactive". It leaves the public key methods first so that if you're set up to use them, they will be tried before asking for a password (and if you use a mechanism like ssh-agent you can have single-authentication using the public key).

If you don't want to use the public key methods, you can just set PreferredAuthentications to "password" (without the quotes).
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Post Reply

Return to “Official Firmware Images”