建议重新启动后无法SSH到计算引擎

时间:2018-10-13 21:04:10

标签: ssh google-compute-engine

我上次SSH进入计算引擎实例时,它提示系统重新启动。我重启了。重新启动后,我不再可以ssh了。实例仍在运行,Web服务器仍在工作。我什至可以成功通过身份验证。它比它关闭连接。日志在下面。


ssh -v -i "privatekey" username@hostname

OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 19: Applying options for *

debug1: Connecting to hostname [ip] port 22.

debug1: Connection established.

debug1: key_load_public: No such file or directory

debug1: identity file [key location] type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/keyfile-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4

debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4

debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000

debug1: Authenticating to hostname:22 as 'username'

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: algorithm: curve25519-sha256@libssh.org

debug1: kex: host key algorithm: ecdsa-sha2-nistp256

debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

debug1: Server host key: Server host key

debug1: Host 'hostname' is known and matches the ECDSA host key.

debug1: Found key in /home/username/.ssh/known_hosts:2

debug1: rekey after 134217728 blocks

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: rekey after 134217728 blocks

debug1: SSH2_MSG_NEWKEYS received

debug1: SSH2_MSG_EXT_INFO received

debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug1: Authentications that can continue: publickey

debug1: Next authentication method: publickey

debug1: Trying private key: privatekeyfile

Enter passphrase for key 'privatekeyfile':

debug1: Authentication succeeded (publickey).

Authenticated to hostname ([ip]:22).

debug1: channel 0: new [client-session]

debug1: Requesting no-more-sessions@openssh.com

debug1: Entering interactive session.

debug1: pledge: network

debug1: channel 0: free: client-session, nchannels 1

**Connection to hostname  closed by remote host.**

**Connection to hostname  closed.**

Transferred: sent 2256, received 1380 bytes, in 0.0 seconds

Bytes per second: sent 155684.5, received 95232.6

debug1: Exit status -1

1 个答案:

答案 0 :(得分:0)

根据您提供的调试输出,我发现了两个输出相似的已解决问题。这是在1st link2nd link中找到的两个链接。他们基本上是通过更改〜/ .ssh权限来解决的。