Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
(gcloud.beta.compute.ssh)[/usr/bin/ssh]已退出,返回代码为[255]_Ssh_Google Cloud Platform_Google Compute Engine_Ufw - Fatal编程技术网

(gcloud.beta.compute.ssh)[/usr/bin/ssh]已退出,返回代码为[255]

(gcloud.beta.compute.ssh)[/usr/bin/ssh]已退出,返回代码为[255],ssh,google-cloud-platform,google-compute-engine,ufw,Ssh,Google Cloud Platform,Google Compute Engine,Ufw,尝试使用ssh连接google云计算机引擎(macOs Catalina) 并得到错误 ssh: connect to host 34.105.11.187 port 22: Operation timed out ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255]. ssh: connect to host 34.105.11.187 port 22: Operation timed ou

尝试使用ssh连接google云计算机引擎(macOs Catalina)

并得到错误

ssh: connect to host 34.105.11.187 port 22: Operation timed out
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255].
ssh: connect to host 34.105.11.187 port 22: Operation timed out
我试着

ssh -I ~/.ssh/mac-vm-key asd61404@34.105.11.187
也得到了错误

ssh: connect to host 34.105.11.187 port 22: Operation timed out
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255].
ssh: connect to host 34.105.11.187 port 22: Operation timed out
所以我找到了这个代码来诊断它

gcloud compute ssh —zone "us-west1-b" "mac-vm" —project "mac-vm-282201" —ssh-flag="-vvv"
返回

OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: resolve_canonicalize: hostname 34.105.11.187 is address
debug2: ssh_connect_direct
debug1: Connecting to 34.105.11.187 [34.105.11.187] port 22.
我不知道,我怎样才能解决这个问题

提前谢谢


这是我最近的串行控制台

Jul  4 02:28:39 mac-vm google_network_daemon[684]: For info, please visit https://www.isc.org/software/dhcp/
Jul  4 02:28:39 mac-vm dhclient[684]: 
Jul  4 02:28:39 mac-vm dhclient[684]: Listening on Socket/ens4
[   19.458355] google_network_daemon[684]: Listening on Socket/ens4
Jul  4 02:28:39 mac-vm google_network_daemon[684]: Listening on Socket/ens4
Jul  4 02:28:39 mac-vm dhclient[684]: Sending on   Socket/ens4
[   19.458697] google_network_daemon[684]: Sending on   Socket/ens4
Jul  4 02:28:39 mac-vm google_network_daemon[684]: Sending on   Socket/ens4
Jul  4 02:28:39 mac-vm systemd[1]: Finished Wait until snapd is fully seeded.
Jul  4 02:28:39 mac-vm systemd[1]: Starting Apply the settings specified in cloud-config...
Jul  4 02:28:39 mac-vm systemd[1]: Condition check resulted in Auto import assertions from block devices being skipped.
Jul  4 02:28:39 mac-vm systemd[1]: Reached target Multi-User System.
Jul  4 02:28:39 mac-vm systemd[1]: Reached target Graphical Interface.
Jul  4 02:28:39 mac-vm systemd[1]: Starting Update UTMP about System Runlevel Changes...
Jul  4 02:28:39 mac-vm systemd[1]: systemd-update-utmp-runlevel.service: Succeeded.
Jul  4 02:28:39 mac-vm systemd[1]: Finished Update UTMP about System Runlevel Changes.
[   20.216129] cloud-init[718]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:config' at Sat, 04 Jul 2020 02:28:39 +0000. Up 20.11 seconds.
Jul  4 02:28:39 mac-vm cloud-init[718]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:config' at Sat, 04 Jul 2020 02:28:39 +0000. Up 20.11 seconds.
Jul  4 02:28:39 mac-vm systemd[1]: Finished Apply the settings specified in cloud-config.
Jul  4 02:28:39 mac-vm systemd[1]: Starting Execute cloud user/final scripts...
Jul  4 02:28:41 mac-vm google-clock-skew: INFO Synced system time with hardware clock.
[   20.886105] cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:final' at Sat, 04 Jul 2020 02:28:41 +0000. Up 20.76 seconds.
[   20.886430] cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 finished at Sat, 04 Jul 2020 02:28:41 +0000. Datasource DataSourceGCE.  Up 20.87 seconds
Jul  4 02:28:41 mac-vm cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:final' at Sat, 04 Jul 2020 02:28:41 +0000. Up 20.76 seconds.
Jul  4 02:28:41 mac-vm cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 finished at Sat, 04 Jul 2020 02:28:41 +0000. Datasource DataSourceGCE.  Up 20.87 seconds
Jul  4 02:28:41 mac-vm systemd[1]: Finished Execute cloud user/final scripts.
Jul  4 02:28:41 mac-vm systemd[1]: Reached target Cloud-init target.
Jul  4 02:28:41 mac-vm systemd[1]: Starting Google Compute Engine Startup Scripts...
Jul  4 02:28:41 mac-vm startup-script: INFO Starting startup scripts.
Jul  4 02:28:41 mac-vm startup-script: INFO Found startup-script in metadata.
Jul  4 02:28:42 mac-vm startup-script: INFO startup-script: sudo: ufw: command not found
Jul  4 02:28:42 mac-vm startup-script: INFO startup-script: Return code 1.
Jul  4 02:28:42 mac-vm startup-script: INFO Finished running startup scripts.
Jul  4 02:28:42 mac-vm systemd[1]: google-startup-scripts.service: Succeeded.
Jul  4 02:28:42 mac-vm systemd[1]: Finished Google Compute Engine Startup Scripts.
Jul  4 02:28:42 mac-vm systemd[1]: Startup finished in 1.396s (kernel) + 20.065s (userspace) = 21.461s.
Jul  4 02:29:06 mac-vm systemd[1]: systemd-hostnamed.service: Succeeded.
Jul  4 02:43:32 mac-vm systemd[1]: Starting Cleanup of Temporary Directories...
Jul  4 02:43:32 mac-vm systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Jul  4 02:43:32 mac-vm systemd[1]: Finished Cleanup of Temporary Directories.
看看你的电脑,看看有什么错误。最常见的错误是:您的VM是tull,来宾代理无法将数据写入主文件夹或任何其他错误。将相关信息(串行控制台日志包含大量信息)添加到问题中,以便我们可以查看与错误相关的内容。查看您的日志,了解错误内容。最常见的错误是:您的VM是tull,来宾代理无法将数据写入主文件夹或任何其他错误。在问题中添加相关信息(串行控制台日志包含大量信息),以便我们可以查看与错误相关的内容。