Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ERROR: (gcloud.cloud-shell.ssh) [/usr/bin/ssh] exited with return code [255].

I am facing this error after I wanted to reset my cloud shell
So I ran

 

 

rm -rf ~/

 

 

and then when i try to login with

 

 

gcloud cloud-shell ssh --authorize-session --ssh-flag="-vvv" 

 

 

I get error

 

 

OpenSSH_9.7p1, OpenSSL 3.3.0 9 Apr 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 2: include /etc/ssh/ssh_config.d/*.conf matched no files
debug2: resolve_canonicalize: hostname 34.124.234.26 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/golam71/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/golam71/.ssh/known_hosts2'
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to 34.124.234.26 [34.124.234.26] port 6000.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: connect to address 34.124.234.26 port 6000: Connection timed out
ssh: connect to host 34.124.234.26 port 6000: Connection timed out
ERROR: (gcloud.cloud-shell.ssh) [/usr/bin/ssh] exited with return code [255].

 

 

after that I read through troubleshooting guide 

from there i tried the ways but a very important thing to note is that I dont have credit card so I cant enable billing.

so i cant use systemd service or firewall

i have tried waiting for the sshd service and enabled by doing

 

 

sudo service ssh start 

 

 

and even ran restart but the issue wont go away

also i did an nmap scan on the ip (the ip 34.124.234.26) seems to not change

$ nmap -sC -sV -Pn 34.124.234.26                     
Starting Nmap 7.95 ( https://nmap.org ) at 2024-05-31 01:03 +06
Nmap scan report for 26.234.124.34.bc.googleusercontent.com (34.124.234.26)
Host is up (0.017s latency).
Not shown: 998 filtered tcp ports (no-response), 1 filtered tcp ports (host-unreach)
PORT   STATE SERVICE VERSION
53/tcp open  domain  ISC BIND 9.8.2rc1 (RedHat Enterprise Linux 6)
| dns-nsid: 
|_  bind.version: 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.5
Service Info: OS: Linux; CPE: cpe:/o:redhat:enterprise_linux:6

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 22.79 seconds
$ nmap -sC -sV -Pn 34.124.234.26 -p 22                                                                                   
Starting Nmap 7.95 ( https://nmap.org ) at 2024-05-31 01:04 +06
Nmap scan report for 26.234.124.34.bc.googleusercontent.com (34.124.234.26)
Host is up.

PORT   STATE    SERVICE VERSION
22/tcp filtered ssh

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.99 seconds
$ nmap -sC -sV -Pn 34.124.234.26 -p-                                                                                     
Starting Nmap 7.95 ( https://nmap.org ) at 2024-05-31 01:10 +06
Nmap scan report for 26.234.124.34.bc.googleusercontent.com (34.124.234.26)
Host is up (0.012s latency).
Not shown: 65532 filtered tcp ports (no-response), 2 filtered tcp ports (host-unreach)
PORT   STATE SERVICE VERSION
53/tcp open  domain  ISC BIND 9.8.2rc1 (RedHat Enterprise Linux 6)
| dns-nsid: 
|_  bind.version: 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.5
Service Info: OS: Linux; CPE: cpe:/o:redhat:enterprise_linux:6

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 260.14 seconds

looking at this i see ssh port 22 is filtered now then how can i enable it i guess?

as in is it firewall issue? i did not touch anything about firewall just rm -rf ed home dir

so what can i do now?
i tried loggin back in creating new project and logged in with another account and that worked fine

so my issue is on this account's cloud shell as i can login with web shell but not gcloud ssh i logged in and then rm -rf home dir that should have reset the machine i also rebooted as in pressed restart from the 3 dots

that should have fixed it but it didnt

so to fix this issue what can i do now?

1 1 571
1 REPLY 1

golam71_0-1717099529446.png

after restart safe mode ephemeral and then

default

it fixes it

 

Top Labels in this Space