版本升級後無法連線到伺服器

版本升級後無法連線到伺服器

我正在升級舊的 16.04 LTS,並且似乎將自己鎖在了門外,無法返回。

我遵循了基本步驟:

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo do-release-upgrade

在發布升級期間,一切都很順利。沒有錯誤訊息,什麼都沒有——是重新啟動導致我無法存取系統。它在連接埠 1022 上啟動的輔助 SSH 進程也完全逾時。

現在的問題是,我無法嘗試以 root@ip 身份連接,因為它已斷開連接。只能使用 SSH 金鑰進行連線。

這是 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

(我編輯了名字和ip)

到底是怎麼回事?為什麼我無法連線?我是否完全把一切都搞砸了,或者有機會以某種方式從中恢復嗎?它是一個虛擬伺服器,我無法物理訪問它,遠端重新啟動現在似乎也失敗了。

幫助 :)

編輯:既然我似乎無法挽救這個問題,我就更具體一點:我到底做錯了什麼?我可以做什麼來防止這種情況發生? SSH 偵錯沒有給我任何關於實際導致問題的回饋,而為此特定情況打開的「保留」連接埠(1022)根本不起作用。

如果我必須失去整個伺服器,至少我想從中學習 - 但它似乎“不起作用”,僅此而已?

編輯2:令人驚訝的是,我設法以主機提供的“修復”模式再次訪問伺服器。既然我已經加入了,我應該做什麼來保證訪問並解決這個問題? (我可以透過 VI 存取所有文件,它們放置在 /repair/ 資料夾中)

相關內容