Score:0

Why I am not able to connect Ubuntu server with SSH key?

cc flag

I have Ubuntu server 22.4 and I it had SSH server installed. Time to time SSH connection was doping even while I was working. I update the SSH by using command sudo apt-get update ssh. After the update, I am not able to connect to my server via SSH.

What I have done so far?

  • I restart the Server

  • I re-install the ssh

  • I switched off the firewall.

  • when run ps -ef | grep ssh I see the following result. enter image description here

  • sudo systemctl status ssh show active and running.

  • I also increase the time for ping to 60 sec and restart the SSH services and server.

  • When I use the same static IP it show error of time out as follow.

    Session stopped Press to exit tab Press R to restart session Press S to save terminal output to file Network error: Connection timed out

  • When I change the IP address I see this error

    Pinging 153.70.70.70 with 32 bytes of data:
    Reply from 192.123.1.2: Destination host unreachable.
    Reply from 192.123.1.2: Destination host unreachable.
    Reply from 192.123.1.2: Destination host unreachable.
    Reply from 192.123.1.2: Destination host unreachable.
    
    Ping statistics for 153.70.70.70:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    

Now I have noting left to try and still not able to find the core issue. Please help me out to find, what exactly the problem is and how to resolve it.

pa4080 avatar
cn flag
I can't understand how `ping` reports *Destination host unreachable.* and in the same time *0% loss*? However, in case you can connect to the server and the connection drops randomly, first I will suppose it is hardware problem on the route - broken cable, switch, router, etc. You can keep the `ping` command alive for a longer period, 30 mins for example, to check that. In addition, please, don't post text as image, just copy/paste the output of your command and use the formatting tools of the form to make it nice for reading.
tauqeerahmad24 avatar
cc flag
Hi pa4080, I normally copy past but non of the ssh connection work that's why I go directly inside of server and copy past don't work. Let me increase it for 30 min a see.
I sit in a Tesla and translated this thread with Ai:

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.