You are not logged in.

#1 2017-03-22 03:29:07

audiomuze
Member
Registered: 2014-03-31
Posts: 103

Lost ssh access after running update using pacman [resolved]

My headless server has been running Arch for over a year without any issues and ssh has also worked without issue during this time.  Yesterday I ran an arch update which ran successfully, however, after rebooting to take account of kernel updates I could no longer access the server via ssh - not as a regular user nor as root (which is previously explicitly re-enabled quite some time back). I know it's rebooted successfully as the server application it runs is accessible by its clients on the network and I can NFS mount the server drives.

Before I dig out a monitor and keyboard, have there been any recent changes to Arch that would trigger this?

Last edited by audiomuze (2017-03-22 08:20:16)


Linux user #338966

Offline

#2 2017-03-22 03:49:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Lost ssh access after running update using pacman [resolved]

Read the pacman log and the journal entries for the ssh service.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-03-22 04:03:55

audiomuze
Member
Registered: 2014-03-31
Posts: 103

Re: Lost ssh access after running update using pacman [resolved]

How?  I don't have access to the server OS.  I guess I could pull the flash drive it boots from and pop it in my Arch desktop machine.

Last edited by audiomuze (2017-03-22 04:08:09)


Linux user #338966

Offline

#4 2017-03-22 04:22:30

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Lost ssh access after running update using pacman [resolved]

You said in your first post you could pull out a monitor and keyboard...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-03-22 07:58:24

audiomuze
Member
Registered: 2014-03-31
Posts: 103

Re: Lost ssh access after running update using pacman [resolved]

Unfortunately my logs on that box aren't persistent as they're written to tmpfs.  Anyhow, the problem seems to me to be upstream with sshd.service or a change to /etc/ssh/sshd_config.  systemctl status sshd.service returns:

sshd.service - OpenSSH Daemon
Loaded: loaded (/usr/lib/systemd/sshd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2017-03-22 08:44:57 SAST; 20min ago
Process: 681 ExecStart=/usr/bin/sshd- D (code=exited, status=255)
Main PID: 681 (code=exited, status=255)

Tried reinstalling it and got same outcome.

Looked at timestamp of /etc/ssh/sshd_config and I see it was changed last night ... so I'm guessing some config was modified by the update and went awry.

Damnit, chasing the rabbithole.

Last edited by audiomuze (2017-03-22 08:04:09)


Linux user #338966

Offline

#6 2017-03-22 08:03:46

audiomuze
Member
Registered: 2014-03-31
Posts: 103

Re: Lost ssh access after running update using pacman [resolved]

Yip, reverted to an earlier sshd_config and all's good again.  Should I be reporting a bug ?


Linux user #338966

Offline

#7 2017-03-22 08:17:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Lost ssh access after running update using pacman [resolved]

No. The update shouldn't have touched your config, it should have created a .pacnew that you can compare with your current config.

What is the diff between the two configs?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2017-03-22 08:19:22

audiomuze
Member
Registered: 2014-03-31
Posts: 103

Re: Lost ssh access after running update using pacman [resolved]

These are the changes made by the update:
--- sshd_config.bk
+++ sshd_config
@@ -97,12 +97,11 @@
UsePAM yes

#AllowAgentForwarding yes
-AllowTcpForwarding yes
+#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
-X11DisplayOffset 10
-X11UseLocalhost yes
-ForwardX11Trusted yes
+#X11DisplayOffset 10
+#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no # pam does that
#PrintLastLog yes

Last edited by audiomuze (2017-03-22 08:20:39)


Linux user #338966

Offline

#9 2017-03-22 08:29:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Lost ssh access after running update using pacman [resolved]

You should work out why your config was overwritten, rather than pacnew'ed. I also don't see any change that would lock you out...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2017-03-22 10:17:23

audiomuze
Member
Registered: 2014-03-31
Posts: 103

Re: Lost ssh access after running update using pacman [resolved]

I learned something today.  I see there is a pacnew. It might've been me that made the x11 related changes as I've been using x-forwarding of late. Still, nor sure why the server speed working with those changes... Guess I need to go read some.


Linux user #338966

Offline

Board footer

Powered by FluxBB