I was in the process of upgrading an old 16.04 LTS, and seemingly locked myself out with no way back in. Help.
I followed the basic steps:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo do-release-upgrade
During the release-upgrade, everything went smoothly. No error messages, nothing - it's the restart that killed my access to the system. The secondary SSH process started by it on port 1022 times out completely as well.
Now, the problem is, I cannot attempt to connect as root@ip, since that was disconnected. Only connecting with an SSH key is possible.
This is the debug from SSH:
:~$ ssh -vvvvvvvvv atlas
OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /home/name/.ssh/config
debug1: /home/name/.ssh/config line 1: Applying options for atlas
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "(ip)" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to (ip) [(ip)] port 22.
debug1: Connection established.
debug1: identity file /home/name/.ssh/atlas_a type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/name/.ssh/atlas_a-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.5
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.5 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to (ip):22 as 'name'
debug3: hostkeys_foreach: reading file "/home/name/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/name/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from (ip)
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Connection closed by (ip) port 22
(I edited out name & ip)
What is going on? Why can't I connect? Did I completely brick everything, or is there a chance to somehow recover from this? It's a virtual server, I do not have access to it physically and remote restarts seem to fail now as well.
Help :)
Edit: Since it seems that I won't be able to salvage this, I'll be a bit more specific: What exactly did I do wrong here? What could I have done to prevent this? The SSH debug doesn't give me any feedback on what actually caused the problem and the "reserve" port (1022) that was opened for this specific case, just doesn't work at all.
If I have to lose the whole server, at least I would like to learn from this - but it just seems to "not work", and that's it?
Edit 2: Surprisingly, I managed to access the server again in a "repair" mode offered by the host. What should I do to guarantee access and fix this, now that I'm in? (I have access to all files via VI, they are placed in a /repair/ folder)
0 Answers