Score:-1

Cannot use ssh keys anymore to connect with different services or repositories

au flag

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.

in flag
Which version of Ubuntu are you running? Have the file permissions in your `.ssh` directory recently changed?
waltinator avatar
it flag
Since the other end is timing out, check the server logs.
user535733 avatar
cn flag
Check your output: `connection timed out` is not an ssh authentication error. It suggests a network problem at the server end.
llesh avatar
au flag
@waltinator I think the problem is on my part . My public keys are in the remote server as they should be https://github.com/username.keys, https://gitlab.com/username.keys, or https://meta.sr.ht/keys .
waltinator avatar
it flag
Read `man ssh-add` and start with `ssh-add -l`.
Score:0
au flag

Update

I am sorry for wasting everyone's time. My ISP was to blame because it updated my modem, changed my password and blocked port 22 for 'security' reasons. I wasted two days about this problem, changing my configurations, trying different ports, resetting my router just because ISP didn't even bother to sent me a notice. Thank you for your answers.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.