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

Hi Fzinken,
That did it! have ssh access again and kodi starts. I think it will probably be better to reload
my kodi plugins again then copy from .kodi backup which was 586M

Not sure if this is related but
sudo apt-get update is throwing some errors:

osmc@osmc:/var/lib/apt/lists$ sudo apt-get update
Ign:2 http://ftp.debian.org/debian stretch InRelease
Hit:3 http://security.debian.org stretch/updates InRelease
Hit:4 http://ftp.debian.org/debian stretch-updates InRelease
Hit:5 http://ftp.debian.org/debian stretch Release
Hit:1 http://ftp.fau.de/osmc/osmc/apt stretch InRelease
Reading package lists… Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/ftp.debian.org_debian_dists_stretch_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

This is what is in my lists:

osmc@osmc:/var/lib/apt/lists$ ls
apt.osmc.tv_dists_stretch_InRelease
apt.osmc.tv_dists_stretch_main_binary-armhf_Packages
apt.osmc.tv_dists_stretch_main_binary-armhf_Packages.diff_Index
ftp.debian.org_debian_dists_stretch_contrib_binary-armhf_Packages
ftp.debian.org_debian_dists_stretch_contrib_i18n_Translation-en
ftp.debian.org_debian_dists_stretch_main_binary-armhf_Packages
ftp.debian.org_debian_dists_stretch_main_i18n_Translation-en
ftp.debian.org_debian_dists_stretch_non-free_binary-armhf_Packages
ftp.debian.org_debian_dists_stretch_non-free_i18n_Translation-en
ftp.debian.org_debian_dists_stretch_Release
ftp.debian.org_debian_dists_stretch_Release.gpg
ftp.debian.org_debian_dists_stretch-updates_InRelease
ftp.debian.org_debian_dists_stretch-updates_main_binary-armhf_Packages
ftp.debian.org_debian_dists_stretch-updates_main_binary-armhf_Packages.diff_Index
ftp.debian.org_debian_dists_stretch-updates_main_i18n_Translation-en
ftp.debian.org_debian_dists_stretch-updates_main_i18n_Translation-en.diff_Index
lock
partial
security.debian.org_dists_stretch_updates_contrib_binary-armhf_Packages
security.debian.org_dists_stretch_updates_contrib_i18n_Translation-en
security.debian.org_dists_stretch_updates_InRelease
security.debian.org_dists_stretch_updates_main_binary-armhf_Packages
security.debian.org_dists_stretch_updates_main_i18n_Translation-en
security.debian.org_dists_stretch_updates_non-free_binary-armhf_Packages
security.debian.org_dists_stretch_updates_non-free_i18n_Translation-en

Not sure if these are obsolete repos now but I’ll wait for advice.
Thank you all all your help so far,

Fzinken thanks for all your help, marking as solved.

Repositories were corrupt, I just removed all the lists and
then generated a new one, with
sudo apt-get update

Well question is still why did it happen? You may want to check your SD Card not that you have a SD corruption underlying

While I could also have been one of the addons

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:

https://paste.osmc.tv/qidulanule

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 http://webiopi.trouch.com/ 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 192.168.254.6 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 hmac-sha1-etm@openssh.com 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_REQUEST sent
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 ([192.168.254.8]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com 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 192.168.254.6
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com 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 ([192.168.254.8]: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?
https://software.opensuse.org/download.html?project=home:osmc&package=osmc-installer&hcolor=17394a&fcolor=17394a&acolor=17394a

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.