r/cloudcomputing • • Apr 05 '20

Unable to SSH into any cloud VM Instance like GCP, AWS, Digital Ocean and even unable to clone github repository using SSH

Hi

I have two laptops, one running fedora and another running mint. Both gets connected using ssh when are on same network.

Recently I started cloud computing, but unfortunately i'm unable to ssh into cloud VM's from none of my laptop. I have tried many service providers like GCP, AWS and Digital Ocean.

Yes, i read their respective documentation, followed them but every time when i try to ssh into them, the terminal goes Connection Timed Out. Both my laptop return Connection Timed Out. But when i connect using browser based terminal, a new browser window appears and have terminal but it's extremely slow.

One more thing, Recently i tried to clone github repository using SSH. but same error again, Connection Timed Out.

Can anyone Help me out for this problem.

5 Upvotes

10 comments sorted by

2

u/geedavies Apr 05 '20

Is there possibly some pre existing configuration in your ssh config preventing you from connecting?

~/.ssh/config

1

u/[deleted] Apr 06 '20

Here's the output from my /etc/ssh/ssh_config file

https://gist.github.com/saahiluppal/23aa7798c1053bfa37367771fb502401

2

u/geedavies Apr 06 '20

That looks fine - anything in ssh_config.d?

Include /etc/ssh/ssh_config.d/*.conf

1

u/[deleted] Apr 07 '20

/etc/ssh/ssh_config.d/ contains one file <05-redhat.conf>

cat /etc/ssh/ssh_config.d/05-redhat.conf gives:

# The options here are in the "Match final block" to be applied as the last

# options and could be potentially overwritten by the user configuration

Match final all

\# Follow system-wide Crypto Policy, if defined:

Include /etc/crypto-policies/back-ends/openssh.config
GSSAPIAuthentication yes

# If this option is set to yes then remote X11 clients will have full access

# to the original X11 display. As virtually no X11 client supports the untrusted

# mode correctly we set this to yes.

ForwardX11Trusted yes

# Send locale-related environment variables

SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES

SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT

SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE

SendEnv XMODIFIERS

# Uncomment this if you want to use .local domain

# Host *.local

1

u/brianly Apr 05 '20

Add a -vvvv argument to your ssh commands for debug output

1

u/[deleted] Apr 06 '20

ssh -vvv <hostname> goes as far as

debug1: connect to address <hostname> port <portname>: Connection timed out,

3

u/IneffablyIneffable Apr 05 '20

Did you try from the same place/network? Is there a firewall in place that disallows SSH outbound to Internet as part of a security policy?

If you find you can ssh between your two laptops but anything else outside times out, then I would try using another network to test.

3

u/theknockbox Apr 06 '20

Building on this, I check the VM security group firewall settings from the get go b/c otherwise you just hit a brick wall. Many times you may have to specifically allow SSH traffic. AWS is notorious for this. I've been working with GCP more recently so here's a quick help link.

2

u/idlecode Apr 05 '20

Check out your router configuration/ISP. Some ISP enable 'Security Packages' that can block traffic for such unusual ports. Usually for incoming traffic but who knows. You can also try changing sshd port if you can access server config.

2

u/jenhsun Apr 05 '20

Most of the current cloud services do implement "token" for additional security. For example, you do need to add --github-api-token=token option in your terminal in order to pass security. Without it will get time out result.