This is my first post on stackexchange and I am a Linux newbie, so if I misconduct anyhow, let me know.
Every time I try to ssh (or telnet) into anything that isn't localhost I cannot connect due to connection time out. Example of output after running ssh -vvv git@github.com:
ssh -vvv git@github.com
OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/klnsptr/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/klnsptr/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/klnsptr/.ssh/known_hosts2'
debug2: resolving "github.com" port 22
debug3: resolve_host: lookup github.com:22
debug3: ssh_connect_direct: entering
debug1: Connecting to github.com [140.82.121.3] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: connect to address 140.82.121.3 port 22: Connection timed out
ssh: connect to host github.com port 22: Connection timed out
Another thing is that I can clone github repositories if I do it over https. However, trying to use an ssh address leaves me at a "Cloning into 'x'..." prompt and later timing out.
I don't think the issue is with my ISP since ssh works perfectly fine on my Windows 10 (using PuTTY), and on a Macbook connected to the same network.
Also, my firewall is turned off so I that's not the issue either.
Tried: reinstalling ssh, rebooting the system, restarting the router, deleting ssh_config. No google search resolved the problem.
My setup is: Ubuntu 22.04 on one SSD (C:) and Win 10 on other SSD(D:). Using grub to boot into one or the other. The pc is connected to a stock router I got from the ISP via an Ethernet cable.
How do I fix this?
Thanks
EDIT: -no vpn -firewall off (ufw status: inactive)
EDIT 2: reinstalled ubuntu, the issue persists.
EDIT 3: So I created a VM from the same iso that I installed ubuntu with just to check what happens. Turns out ssh works in the VM. (?????)
EDIT 4: Reinstalled ubuntu again, updated to 22.10 - nothing. Then, I downgraded to 20.04 - the issue is resolved, ssh works just fine now. However, I am still looking for a solution for 22.04 if anyone has any ideas.
ssh -v
(or-vvv
) to see what is happening? – Esther Nov 10 '22 at 18:11sudo ufw status
returns:Status: inactive
I didn't install any firewall, I am on a fresh ubuntu. – klnstprx Nov 10 '22 at 20:04Connection established.
immediately after theConnecting to github.com
line. Before attempting to authenticate. Does SSH work generally, to other hosts, from that machine? It really looks like network, so keep pushing on that front. – John Mee Nov 13 '22 at 01:26