登录后 ssh 服务器断开连接

登录后 ssh 服务器断开连接

由于之前对服务器和 ssh 一无所知,我最近不得不连接到 ssh 服务器以逃避政府对互联网的审查(使用 ssh 服务器作为 vpn),但当我尝试连接到服务器时,它连接后立即断开连接。我无法想出适合我情况的答案。

此外,我使用的服务器是从互联网上免费获得的,例如 serverssh.net 等网站。我使用的是 mac。

❯ ssh username@server

<h3><font color='black'>SERVERSSH.NET
</font></h3>
<h3><font color='blue'>JAGOANSSH.COM
</font></h3>
username@server password: 
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-193-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 System information disabled due to load higher than 1.0

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

6 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

New release '20.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.



The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

Last login: Mon Sep 26 16:12:09 2022 from *.*.*.*
Could not chdir to home directory /home/username: No such file or directory
Connection to server closed.

❯ /usr/sbin/sshd -d

debug1: sshd version OpenSSH_8.6, LibreSSL 3.3.6
debug1: Unable to load host key: /etc/ssh/ssh_host_rsa_key
debug1: Unable to load host key: /etc/ssh/ssh_host_ecdsa_key
debug1: Unable to load host key: /etc/ssh/ssh_host_ed25519_key
sshd: no hostkeys available -- exiting.

❯ ssh -vvv username@server

.
.
.

debug3: send packet: type 1
debug3: fd 1 is not O_NONBLOCK
Connection to server closed.
Transferred: sent 2272, received 5272 bytes, in 2.1 seconds
Bytes per second: sent 1095.3, received 2541.5
debug1: Exit status 1

相关内容