I set a bunch of keys that I use for various reasons like connecting to my personal website or various source control management platforms like GitHub or sourcehut. I was working as usually as recently as yesterday, but today suddenly none of my keys worked when I tried to connect with ssh. When I try to connect it just for example to my website it shows this screen:
# ssh -vvv -i ~/.ssh/digitalocean_ed25519 [email protected]
OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f 31 Mar 2020
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 *
debug2: resolving "mywebsite.com" port 22
debug2: ssh_connect_direct
debug1: Connecting to mywebsite.com [mywebsiteip] port 22.
debug1: connect to address mywebsiteip port 22: Connection timed out
ssh: connect to host mywebsite.com port 22: Connection timed out
Same thing happens when I try to clone a read/write repository for source management websites like github or sourcehut.
From another question it suggests to look the permissions, but they appear to be ok. And I didn't had a config file.
ls -l
total 36
-rw------- 1 user user 464 Jul 17 09:41 digitalocean_ed25519
-rw-r--r-- 1 user user 104 Apr 12 20:55 digitalocean_ed25519.pub
-rw------- 1 user user 464 Apr 12 17:02 github_ed25519
-rw-r--r-- 1 user user 104 Apr 12 17:02 github_ed25519.pub
-rw------- 1 user user 419 Apr 17 23:11 gitlab_ed25519
-rw-r--r-- 1 user user 104 Apr 17 23:11 gitlab_ed25519.pub
-rw------- 1 user user 1998 Jun 1 21:59 known_hosts
-rw------- 1 user user 2655 Apr 12 19:44 srht_rsa
-rw-r--r-- 1 user user 566 Apr 12 19:44 srht_rsa.pub
and .ssh
folder has 700 permission.
I reinstalled ssh sudo apt install openssh-server
but to no avail. Problem persists even after reinstalling. Only thing I did I deleted in the .ssh folder is the file known_hosts.old
, but I think it has nothing to do to my problem. I suspect the key management system of Ubuntu 20.04 is to blame, but I am not sure.