cannot connect to gitlab locally / browser (Virtual Box linux works just fine) - linux

So I've had this problem before at work, then it was solved by getting a new computer (it was old).
Yesterday everything worked fine, this morning I try to surf to the company gitlab and couldn't connect. When I try to clone a repository to my local system I get a port 22: Connection timed out and when I try it with https I get port 443: Timed out
On chrome I get "ERR_CONNECTION_TIMED_OUT"
Edge tells me "There was a temporary DNS error. Try refreshing the page.
Error Code: INET_E_RESOURCE_NOT_FOUND"
I've pinged the ip and I get "Request timed out"
When I run $ ssh -vT git#github.com it gives me a bunch of lines but it ends in
debug1: No more authentication methods to try.
Permission denied (publickey).
If I run $ ssh -vT git#gitlab.company.com I just get
OpenSSH_7.5p1, OpenSSL 1.0.2k 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to gitlab.company.com [10.1.10.21] port 22.
cddebug1: connect to address 10.1.10.21 port 22: Connection timed out
ssh: connect to host gitlab.company.com port 22: Connection timed out
I've regenerated SSH keys and put them in https://gitlab.com/profile/keys (that I can acces, its just the gitlab.company.com that doesn't work).
I talked to IT at the company and they said nothing has changed, no new firewalls, no nothing.
I did install the Chrome Test Server to start making PWA but removed it after I discovered I had this gitlab problem again thinking it might have to do something with it. I rebooted my pc after the uninstall.
What more can I do? I'm on Windows 10 and run Ubuntu in Oracle VM virtual box (where I can connect just fine).
Thanks.
EDIT:
I've done a system restore to a couple of days ago, didn't help, I logged in a different windows account, still couldn't connect, I've changed network cable (using a coworker his "internet") still doesn't work. There must be something that I'm doing locally that messed things up.

Related

Solving the a client side SSH connection error

Essentially I cannot connect to an SSH server anymore. Whenever I try to connect I get the following error:
ssh: connect to host HOSTNAME port 22: Connection refused
Note that I am able to connect from a different machine. Hence, the issue seems to be client side. Furthermore, I also cannot pull/push to git repositories that are cloned via ssh. Again, when pulling I get the following error:
ssh: connect to host github.com port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists
It seems like I somehow nuked my SSH installations/config files. I have reinstalled SSH but this did not fix the problem. Any ideas?
Note that you never "connect" to github.com directly (no interactive shell)
As mentioned here, "Connection refused" means
invalid IP address for github.com (manual entry in /etc/hosts or your resolver)
firewall along the way to github.com which blocks the ssh traffic (eg. local firewall or corporate firewall)
So is the other machine (where you do succeed) on the same network?
Check if the other machine SSH config file was not using ssh.gthub.com port 443 (instead of the default github.com:22, typically blocked in a corporate environment).

ssh: connect to host ********* port 22: Connection timed out

I have Ubuntu 22.04 newly installed on my laptop. I am trying to connect to a remote server and getting the following error:
ssh: connect to host ********* port 22: Connection timed out
I tried some solutions which include,
ping the IP address
adding the IP address to the firewall using sudo ufw
installing ssh and openssh
However, nothing seems to work. I'd be thankful if someone can help me to solve this problem.
If you can ping the server it can be the following causes:
The server is not answering ssh, sometimes ssh server is not up or it is answering in another port.
There is a firewall blocking your request.
You do not need to install the openssh server in your computer to access a remote hosts and normally outbound connections are allowed by ufw.
ssh: connect to host ********* port 22: Connection timed out
I have this kind of problem too I contact the server admin and said the operation system should be install again due to some problems
after re installing the problem solved try it it may works

Accessing CRC (OpenShift) on a remote server: "openshift crc ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused"

I ask you for help because I was unable to access the OpenShift web console, installed in a VM, from my pc.
I am not an expert on linux, so please excuse me if I make any mistakes in exposing the problem.
I followed these steps:
I accessed the shell of the VM via SSH.
I successfully installed CRC on VM following this guide: https://crc.dev/crc/#installation_gsg.
I added at the end of my computer's etc/hosts file the following line: 127.0.0.1 oauth-openshift.apps-crc.testing console-openshift-console.apps-crc.testing downloads-openshift-console.apps-crc.testing default-route-openshift-image-registry.apps-crc.testing canary-openshift-ingress-canary.apps-crc.testing
I tried to access the web console of Openshift via SSH with this command: ssh -L 443:console-openshift-console.apps-crc.testing:443 myuser#xxx.xx.x.xxx
But I got the following error message: ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused.
If it helps, by running the same command with -v flag, I get: debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
What could be the problem? Did I do something wrong or did I forget any configuration to do?
Many thanks in advance.

Node Js ssh: connect to host port 22. No route to host

Hi I in an attempt to connect to more than one aws account I did a number of stuff that has led to this error. "ssh: connect to host abc.com port 22: No route to host" I dont know what the problem is or how to solve it.
This kind of issue occurs mostly due to following reasons:
Maybe your device is not properly connected to internet. Check your internet connection and try to load again.
May be config file has incorrect information. Check your config file has correct information. Check your ssh directory and ensure that ssh key exists.

Jenkins cannot SSH into github

Running ubuntu on EC2 instance. I want to setup Jenkins SSH with my github server, but when I run the command
ssh -vT git#github.com
I receive the following output:
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to github.com [192.30.253.113] port 22.
ssh: connect to host github.com port 22: Connection timed out
My ssh key for jenkins is located in the /var/lib/jenkins/.ssh folder, but it looks as if ssh config data is being read in the /etc/ folder
I have added the public SSH key to my github account and have verified that I did so as one line.
What else am I missing?
I came across this Creating SSH keys for Gerrit and Hudson as a potential reason why it is not connecting, but I find it highly unlikely that the last time this occurred for somebody was 5 years ago.
This looks more like a networking issue as you receive a Connection timed out error.
So, first check that you can really connect to the github server, e.g. using nmap or telnet; the output should look like this if networking is ok:
$ telnet github.com 22
Trying 192.30.253.112...
Connected to github.com.
Escape character is '^]'.
SSH-2.0-libssh-0.7.0
ssh keys are usually located in $HOME/.ssh/ (where $HOME is the home directory of the user that runs the Jenkins master) -- the folder /var/lib/jenkins/.ssh looks at least unusal.
The directory /etc/ssh contains system-wide ssh configuration data, it will always be read and is not intended for user-specific configuration items.
Turns out that EC2 doesn't seem to let me connect to github via port 22.
I tested this via Alex O's suggestion that I attempt to telnet into git
My solution:
Use SSH through the HTTPS port
Change the config file for github to
ssh through 443
Profit
Major cred to #AlexO

Resources