I ran sudo apt update then sudo apt full-upgrade on 2 OSMC Pi’s this morning.
The first one went with no issues, i seen it wanted a reboot when complete. ran sudo apt autoremove prior, it rebooted an I could ssh right back in.
The second one I preformed exact same tasks. However it would not let me ssh back in, connection refused. It pings and replies, I can use my Kore remote on androids to connect and control Kodi, just lacking my ssh connection. Connected a keyboard, EXIT, ESC at splash and get terminal, login with user osmc and pass osmc. Enter sudo raspi-config screen goes blank and then it reboots to Kodi.
What I’m looking for is what file to edit while the fs is mounted in a MicroUSB reader.
TIA
Bill
raspi-config doesn’t exist on OSMC.
To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.
Thanks for your understanding. We hope that we can help you get up and running again shortly.
Sam, what log would be relevant in the OSMC log uploader that when I ssh in from another system that says connection refused?
Just use grab-logs -A
than you can be sure to catch it.
Issue starts here that I can see…
Mar 12 08:38:27 MomDad systemd[1]: Starting OpenVPN service…
Mar 12 08:38:27 MomDad systemd[1]: Starting OpenBSD Secure Shell server…
Mar 12 08:38:27 MomDad systemd[1]: Starting Transmission BitTorrent Daemon…
Mar 12 08:38:27 MomDad systemd[1]: Starting Wait for Network to be Configured…
Mar 12 08:38:27 MomDad systemd[1]: Starting Set Time using HTTP query…
Mar 12 08:38:27 MomDad systemd[1]: Started OpenVPN service.
Mar 12 08:38:28 MomDad kernel: nf_conntrack version 0.5.0 (6144 buckets, 24576 max)
Mar 12 08:38:28 MomDad sshd[194]: Missing privilege separation directory: /run/sshd
Mar 12 08:38:28 MomDad systemd[1]: ssh.service: Control process exited, code=exited status=255
Mar 12 08:38:28 MomDad systemd[1]: Failed to start OpenBSD Secure Shell server.
Mar 12 08:38:28 MomDad systemd[1]: ssh.service: Unit entered failed state.
Mar 12 08:38:28 MomDad systemd[1]: ssh.service: Failed with result ‘exit-code’.
Looks like you have a Pi1 not a Pi2 just for future reference.
Looks like your ssh setup is messed up.
Whats the output of ls -lah /run
?
Mar 12 08:38:28 MomDad sshd[194]: Missing privilege separation directory: /run/sshd
Mar 12 08:38:28 MomDad systemd[1]: ssh.service: Control process exited, code=exited status=255
Mar 12 08:38:28 MomDad systemd[1]: Failed to start OpenBSD Secure Shell server.
Mar 12 08:38:28 MomDad systemd[1]: ssh.service: Unit entered failed state.
Mar 12 08:38:28 MomDad systemd[1]: ssh.service: Failed with result 'exit-code'.
4USB ports were nto available on Pi 1 iirc. just a minute, I’ll have to go upstairs with laptop since ssh isn’t working
Show URL of
paste-log /etc/ssh/sshd_config
It’s a Pi 1 Model B+ revision 1.2
Tried, as soon as I get logged into treminal, I typed out ls -lah /run and the system reboots to Kodi GUI.
I can mount the MicroSD card onto my ubuntu laptop if that would be beneficial to tracking this down
btw I even went throught he My OSMC interface and disabled and reenabled sshd.service in Services menu to no avail.
Thats not a good sign and actually quite confusing
running update manually from My OSMC again, see if that helps anything
If that doesn’t help remember
Had to mount the card on my laptop to get it.
It looks like almost everything is commented out.
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation sandbox
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
Why? What happend when you run paste-log /etc/ssh/sshd_config
?
But the sshd.config looks ok (I reformatted your post so it’s readable)
i cannot get terminal to stay up to run a command, it reboots into Kodi
Even after you press ESC?
I get logged in with osmc osmc type out command hit enter and it reboots