Just installed SSH, can't log in

After using Vero4K for over a year, I finally got around to playing with SSH. I went to the App Store and installed SSH as a service, and it said the installation was successful. I first tried to login using Ubuntu and the command $ssh osmc@vero_ip. It asked me the yes/no question about trusting or whatever, and I responded with yes, then came the password prompt. I supplied osmc as the password, and it told me it was incorrect. I tried a few times with the same result. Next I used the same ssh commands from Windows 10 command prompt with the exact same results.

So next I tried to uninstall the ssh service using the app store. I received an error saying the uninstall was unsuccessful. now I can’t even get into the services function in OSMC.

I downloaded a complete log file, but I can’t seem to attach it here.

Steve

Upload it via My OSMC -> Logs

Sam

Ok, the log uploader says URL:https://paste.osmc.tv/ijemiyikew

Well it seems you had purged osmc-ssh in 2017

Start-Date: 2017-08-20  09:02:25
Purge: ssh-app-osmc:armhf (1.2.2)
End-Date: 2017-08-20  09:02:26

And then tried to reinstall in 2020

Log started: 2020-01-22  20:32:59
Selecting previously unselected package ssh-app-osmc.
Preparing to unpack .../ssh-app-osmc_1.2.3_all.deb ...
Adding 'diversion of /etc/ssh/sshd_config to /etc/ssh/sshd_config.distributed by ssh-app-osmc'
Unpacking ssh-app-osmc (1.2.3) ...
Setting up ssh-app-osmc (1.2.3) ...
Log ended: 2020-01-22  20:33:01

Log started: 2020-01-22  21:09:58
Removing ssh-app-osmc (1.2.3) ...
Removing 'diversion of /etc/ssh/sshd_config to /etc/ssh/sshd_config.distributed by ssh-app-osmc'
dpkg-divert: error: rename involves overwriting '/etc/ssh/sshd_config' with
  different file '/etc/ssh/sshd_config.distributed', not allowed
dpkg: error processing package ssh-app-osmc (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 ssh-app-osmc
Log ended: 2020-01-22  21:09:58

It could be that your SSH configuration is now in a bit of a limbo.
Anyhow based on Kernel log it looks like SSH server is starting but I can not see any tries to connect to SSH.

  1. Did you try to login via SSH before you uploaded the logs?
  2. Are you sure you connect to the right IP Address?

It looks like SSH is still running:

Jan 22 21:23:22 osmc sshd[515]: Server listening on 0.0.0.0 port 22.
Jan 22 21:23:22 osmc sshd[515]: Server listening on :: port 22.

You should try to SSH to the device and run this command

sudo apt-get install --reinstall ssh-app-osmc

While this questions are still valid (and looking forward for answers) I read your original post. I guess it could be that you changed the password in 2017. So to exclude ssh as the issue I suggest you try to connect a keyboard and login at the local terminal (exit Kodi and press ESC).

1 Like

The SSH package shouldn’t be removable. If it is removed it will likely cause serious damage to the integrity of the system

Sam

I can’t remember if I tried logging in before uploading the log. I’m pretty sure I did. Yes, I’m sure its the correct IP for two reasons; its the same IP as found in my network settings for OSMC, and I only have the one device running ssh in my house.

maybe i changed the password in 2017. I can try some other passwords. But wouldn’t re-loading the ssh service through the app store make it go back to default?

Dumb question, but how do I exit Kodi once I’ve connected a keyboard?

Reloading SSH won’t reset your logon password.

https://osmc.tv/wiki/general/accessing-the-command-line/ See under “Logging in locally”.

Thanks for looking through the log Sam. Egg on my face; I tried a few passwords that I was using in 2017, and bingo! I don’t recall changing passwords, but I can’t argue that I did.

Sorry for the fuss.

1 Like