Connect o OpenHAB console from localhost via ssh not working

  • Platform information:
    • Hardware: Rapberry Pi 3 B+
    • OS: OpenHabian 1.4.1 + all updates till 2019-07-13
    • Java Runtime Environment: bundled in OpenHabian
    • openHAB version: openHAB 2.4.0-1 (Release Build)
  • Issue of the topic: unable to local to openhab console when connected to raspberry localhost via ssh

Fresh install of OpenHabian, full update of all components, latest stable.
I changed openhab console password with openhab utility.
First time localhost generated keys.
Unable to log in.
I changed console password again to very simple password.

[10:06:22] openhabian@openHABianPi:~$ ssh -p 8101 openhab@localhost
Password authentication
Password:
Password authentication
Password:
Password authentication
Password:
openhab@localhost's password:
Permission denied, please try again.
openhab@localhost's password:
Permission denied, please try again.
openhab@localhost's password:

Unable to log in.

What happens if you try to open the console in this way ?

[12:39:25] hab@openHABianPi:~$ openhab-cli console

Logging in as openhab

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.5.0.M1
                               Milestone Build

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab> logout
[12:40:02] hab@openHABianPi:~$

well, it works not even asking for password, but tutorial didnt mention that console should be started THIS way :slight_smile:
[13:09:27] openhabian@openHABianPi:~$ openhab-cli console

Logging in as openhab

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.4.0
                               Release Build

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

thanks!
I followed “offical” how-to article while installing fresh openhabian:
https://www.openhab.org/docs/installation/openhabian.html

Good to hear that it works now. Pls. have a look here.

If your problem is solved, pls mark the post.

1 Like

Are you using the console password instead of the openhabian user’s password?

It defaults to: habopen

There are ways to change it and/or set up keys, but they’re more complex that just using the script mentioned.

After fresh install of openhabian I changed default passwords for linux, console and Samba access, switched from stable to nighlies and problems started.
Console wasn’t respondig as local ssh, only invoking via cli command mentioned above; samba shares weren’t working correcly. At least my IKEA binding was showing sliders for dimming instead of on/off switches.

I ended flashing with fresh openhabian. I changed Linux password and Samba password (limited to old NT4 password length of 16 chars) leaving openhab default password - and so far everything is OK. I assume that without binding console to interfaces it is accessible only from localhost so it is safe.

Should be safe enough for most people. I rarely change that password; if you’ve gotten a shell on the host so you can get to the logs, there are worse things you can do.

I HAVE found the directions and set up ssh keys for it, so I can have rules ssh in and do things at the console, like start or stop stuck modules. But again, that’s all from the local host.