PDA

View Full Version : [ubuntu] 16.04lts openssh connection refused after todays update



Frank P
September 18th, 2020, 01:29 AM
ran latest update to day (headless) so I didn't see result. When I tried to ssh in connection refused. Set up a monitor so i can see whats happening. Removed and reinstalled openssh-server.



dkpg error processing openssh-server (--configure)
subprocess installed post-installation script returned error exit status 1


where do i go from here ?
Thanks

TheFu
September 18th, 2020, 03:43 PM
Check the system logs?
Check the process table? Is sshd running?
Could the system be out of storage?
If sshd is running, is there a firewall in the way?
If sshd is running, can you turn up the debug output from an ssh client? ssh -vvvv userid@server Anything in that output?
If you boot into the last kernel, does ssh work?
Are there any disk issues reported by SMART?
Are there any network issues?

There are 1,000s of other possible issues. Could be anything. Eliminate everything else on the system as a problem.

Frank P
September 18th, 2020, 04:25 PM
what I have done so far, in order, is
sudo dpkg --configure -f
sudo apt-get install -f
sudo apt-get remove --purge openssh-server
sudo apt-get autoremove

all seemed to execute okay but install still errors with same messages

wont't be able to follow your suggestions until next Tuesday.
Will report back
Thanks

ActionParsnip
September 18th, 2020, 05:10 PM
If the SSH server isn't running you need to get that started first. If you can SSH to localhost then this will show it is working. You can then expand t external clients.

Frank P
September 22nd, 2020, 04:07 AM
ran command below to make sure all traces were gone
sudo apt remove --purge openssh-server
ran
sudo apt install openssh-server
got several errors - results below


Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
openssh-sftp-server ssh-import-id
Suggested packages:
ssh-askpass rssh molly-guard monkeysphere
The following NEW packages will be installed:
openssh-server openssh-sftp-server ssh-import-id
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/432 kB of archives.
After this operation, 1,245 kB of additional disk space will be used.
Do you want to continue? [Y/n] Preconfiguring packages ...
Selecting previously unselected package openssh-sftp-server.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 278101 files and directories currently installed.)
Preparing to unpack .../openssh-sftp-server_1%3a7.2p2-4ubuntu2.10_i386.deb ...
Unpacking openssh-sftp-server (1:7.2p2-4ubuntu2.10) ...
Selecting previously unselected package openssh-server.
Preparing to unpack .../openssh-server_1%3a7.2p2-4ubuntu2.10_i386.deb ...
Unpacking openssh-server (1:7.2p2-4ubuntu2.10) ...
Selecting previously unselected package ssh-import-id.
Preparing to unpack .../ssh-import-id_5.5-0ubuntu1_all.deb ...
Unpacking ssh-import-id (5.5-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.29) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
WARN: /etc is group writable!
WARN: Duplicate profile 'Apache', using last found
WARN: Duplicate profile 'Apache Secure', using last found
WARN: Duplicate profile 'Apache Full', using last found
Setting up openssh-sftp-server (1:7.2p2-4ubuntu2.10) ...
Setting up openssh-server (1:7.2p2-4ubuntu2.10) ...
Creating SSH2 RSA key; this may take some time ...
2048 SHA256:SAj7dQlDZPvLnPsRM4hFVkt6zcP0TJhVdFtDYQOIViY root@t110 (RSA)
Creating SSH2 DSA key; this may take some time ...
1024 SHA256:OrDPV7Yn0xXkpvyOWztDf5beWF1Tm3j88osF83Yxx9w root@t110 (DSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:tlrmSCE7OXRubmlqc7lnYShtGa5TAVBAfVCe5nfO0rY root@t110 (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:Ddt4QWhkiXAlEYNAnzUDn59SOhiDa2v9T4QSMV4fWLI root@t110 (ED25519)
Unsafe symlinks encountered in /var/run/sshd, refusing.
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'screen-cleanup' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `screen-cleanup'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `screen-cleanup'
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ssh, action "start" failed.
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2020-09-21 22:58:49 EDT; 5ms ago
Process: 5835 ExecStartPre=/usr/sbin/sshd -t [0;1;31m(code=exited, status=255)[0m


Sep 21 22:58:49 t110 systemd[1]: [0;1;31mFailed to start OpenBSD Secure Shell server.[0m
Sep 21 22:58:49 t110 systemd[1]: [0;1;39mssh.service: Unit entered failed state.[0m
Sep 21 22:58:49 t110 systemd[1]: [0;1;39mssh.service: Failed with result 'exit-code'.[0m
dpkg: error processing package openssh-server (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up ssh-import-id (5.5-0ubuntu1) ...
Processing triggers for systemd (229-4ubuntu21.29) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
WARN: /etc is group writable!
WARN: Duplicate profile 'Apache', using last found
WARN: Duplicate profile 'Apache Secure', using last found
WARN: Duplicate profile 'Apache Full', using last found
Errors were encountered while processing:
openssh-server


Whats my next step
Thanks

Frank P
September 24th, 2020, 07:15 PM
Consider this closed. Have reformulated my question and reasked it in General Help