Cant login via SSH and alternate segfaults/sad face [SOLVED]

Getting rid of ~/.kodi has saved a lot of extra space (not that I was running out)
and it was the first time I gained SSH access.

Later I will run a full fsck on the partition to check, for now I feel it has been one of the addons or perhaps the unclean shutdown when there was a power cut. My Sandisk micro SD card has a 10 year warranty and although I’ve heard many times of SD card corruption, Ive been fortunate not to experience this myself.

OK, my previous post of No SSH access was fixed when I deleted ~/.kodi and rebooted.
My OSMC version was January.

After a manual update my OSMC version changed to February but cant load the March update the message on TV screen was
“Update Error- Please Report to the Forum”

The problem I have is I cant gain SSH access to my OSMC Raspberry Pi Model 2 using ethernet

Ive usedthe remote to upload logs:

I have removed my sdcard and ran a fsck against the ext4 partition it has reported clean
I then forced a check:
sudo fsck.ext4 -f /dev/sdb2

where sdb2 was the ext4 partition on my SD card. Again pass1 and pass2 clean fragmentatuin 0,2%

In the past Ive had all sorts of rubbish and interfaces and apache2, php that I dont need now, I’ve started clean by deleting .kodi but still cant get ssh access. I even tried ed25519
but still cant gain access.

On reboot I tried pressing Esc from attached USB keyboard but still cant gain access.
I have installed sshfs and can mount the full / filesystem on my linux labtop, this may be
one way of deleteing a file or plugin if it can be fixed.

Am I looking at a reload or any way to fix this?
Thanks in advance
(OSMC appears to work ok just cant access via SSH and I use crontab and mpc/mpd and
webiopi for some small home control)

First question, why did you start a new thread and didn’t continue in your existing thread?

Secondly, the ESC key is not when it is booting. After Kodi has fully started choose exit in power menu.
Than press ESC

Hi Fzinken,
Started a new thread as I marked last one closed and a different message (you can merge
threads if you want).

Ok, so after exit, then Esc TTY1 allows me to login with username and password (both osmc).
There is a brief message, then screen returns to TTY2 and brief message and back to TTY3, after TTY6 it returns to Kodi screen on TV.

The brief message is almost too fast to read but think it is this:

Linux osmc 4.14.15-5-osmc #1 SMP PREEMPT Sun Mar 4 08:39:02 UTC 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Mar  8 13:18:01 201

The above is also the same message if I try to access from SSH onsame network from another linux computer.
Should i be logging in with different credentials or is there anything else I can try?

Maybe considering the history try to plug the SD card into the PC and move the .kodi folder to .kodi_backup.

If that makes it behave normal you know that your kodi config is the issue.
If problem persist afterwards than you can move back your .kodi_backup and we need to investigate other possibilities.

Will merge

Ok, moved .kodi to kodi_bakup and rebooted. This is strange.
Still have no SSH access ??

Any other ideas?
Thanks for cotinued support

What’s your SSH client?

You’ve successfully logged on via SSH, then this line appears:

Mar 08 10:06:26 osmc sshd[559]: Received disconnect from port 52058:11: disconnected by user

It seems to be your SSH client that’s disconnecting.

I’m using:
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.10, OpenSSL 1.0.1f 6 Jan 2014

that’s from Mint 17.3 SSH works to my other RPi running Debian Jessie

If I increase the verbosity on SSH:
ssh -vvv osmc@sofia

debug1: kex: client->server aes128-ctr none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 50:14:d6:21:40:8b:de:8a:11:29:a8:3c:eb:33:ca:95
debug1: Host 'sofia' is known and matches the ECDSA host key.
debug1: Found key in /home/anc/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/anc/.ssh/id_rsa
debug1: Trying private key: /home/anc/.ssh/id_dsa
debug1: Trying private key: /home/anc/.ssh/id_ecdsa
debug1: Trying private key: /home/anc/.ssh/id_ed25519
debug1: Next authentication method: password
osmc@sofia's password: 
debug1: Authentication succeeded (password).
Authenticated to sofia ([]:22).
debug1: channel 0: new [client-session]
debug1: Requesting
debug1: Entering interactive session.
debug1: client_input_global_request: rtype want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_GB.UTF-8
Linux osmc 4.14.15-5-osmc #1 SMP PREEMPT Sun Mar 4 08:39:02 UTC 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Mar  8 20:04:20 2018 from
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug1: client_input_channel_req: channel 0 rtype reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to sofia closed.
Transferred: sent 2824, received 3080 bytes, in 0.4 seconds
Bytes per second: sent 7878.7, received 8593.0
debug1: Exit status -1

A lot of output but predomintly the lines:

debug1: Authentication succeeded (password).
Authenticated to sofia ([]:22).

match authentication. I’ve even deleted both ~/.ssh keys on client (Linux Mate) and
deleted from server OSMC using sshfs but still problem persists.

Have also tried using remote control from OSMC settings, services disabling SSH access and then re-enabling it, still the same.
I have a feeling that due to past history my OSMC its ready for a card format and reload.

It’s not clear what the problem is but you mentioned you’re using -vvv debug level. However, we only see debug1 messages. We should also be seeing debug2 and debug3 messages.

I’d say your SSH client isn’t necessarily off the hook.

I’ve just rebooted into Manjaro Linux OpenSSH v7.1 and still the same problem with OSMC.
Im sure it will be down to my previous history of installing too many unwanted packages.

I wish i’d have runu

to have made a copy of the osmc directory structure when things were normal.
Still all working about from SSH but i cant understand why sshfs still works.
Commnds are

sshfs osmc@sofia:/mnt/backup backup

where /mnt/backup is my external hard drive partition connected to the Pi and backup is just the mount directory on my local machine. I have disabled root login in /etc/ssh/sshd_config as just limited to osmc account

Sorry a line was missing in my post.
I wish i’d run

tree / > osmc.fs

OK, Ive decided to reinstall.
This problem is one I’ve caused, not a fault of OSMC or a bad update. Forum time is valuable
and I’ve had many replies already.

I think re-installation should just be a matter of a quick fsck or rm -rf on the ext4 partition, copy the install image and execute it. I’ve backed up all my own files. I’ll make a copy of my codec license keys from /boot partition.

1 Like

Doesn’t harm, but actually since at least half a year they are stored in the firmware after you entered them once

Thanks fzinken, didnt realize that.

Well this is embarassing but I cant find the install instructions for linux to install from compressed image.
The tool I will use is dd, so think the command will be

dd if=OSMC_TGT_rbp2_20180207.img of=/dev/sdx

where sdx will be my mounted ext4 partition. Not sure whether to add a block size command or not. SD card is class10 16G

That should work, but why not use the OSMC installer?

I think /dev/sdx should be the device, not a partition. It should be attached but not mounted.

It’s more efficient to use a fairly large BS.

Fzinken & dillthedog

Installed using the installer and all seems well,
i choose latest image January 2018

I’m using the default OSMC skin and only installed 2 addons.
/ space is now 9% previous installed was about 25%

About 30 minutes ago there was an update to February 2018, Ive changed
update frequency now to once a week. After the update I pressed OSMC
and for a moment the sad face appeared :slight_smile: but 10 seconds later kodi returned.

When I checked the load average, it was high around 3 and most likely i had not
given the system enough time to decompress and install the updates. Anyway
all seems fine and can log in using SSH again.

The kernel is now 4.14-15 and the old 4.9.29 kernel still remains in /boot
Is it ok to delete the old kernel and module tree in /lib/modules or shall I just leave it

Will be marking this thread as solved shortly. Many thanks for all your help.

Excellent news.

Leave it. The update system leaves the previous kernel as a fallback. Anything older becomes an autoremove candidate if you update via the command line, and is automatically removed if you update via the GUI.

Excellent! I’ve marked first post as solved.

The problem was almost certainly down to some tinkering and software/clash
reinstalling has freed up some card space and OSMC does feel like its running quicker.
Thanks for all the support.