SSH Error - Resolve "Connection Refused" On Port 22 Error

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024

ความคิดเห็น • 89

  • @supersmart671
    @supersmart671 2 หลายเดือนก่อน +2

    My SSH is running but still unable to connect, throwing an "Unknown Error"

  • @allnightgrinder3511
    @allnightgrinder3511 3 หลายเดือนก่อน

    you helped me so much. i was stuck watching many videos and then i found yours. THANK YOU!

  • @aykutyuzucu5875
    @aykutyuzucu5875 6 หลายเดือนก่อน +2

    I can't still connect after all i done. My server is hetzner. Is there any solution?

  • @faruk8247
    @faruk8247 ปีที่แล้ว +2

    I'm creating a hetzner new cloud server. I can't log in with the information sent to my e-mail address. How can I solve this problem? I can't understand the problem.

  • @fewselage
    @fewselage ปีที่แล้ว +2

    😃 THANK YOU RABI!!!!!!! I wish I would have seen your video before spending HOURS of frustration.

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      Thanks for leaving a comment.
      I hope we got you a bit further.

  • @leeannaadams4137
    @leeannaadams4137 ปีที่แล้ว +2

    SSH is installed but after I type sudo service ssh status it says disabled… how do I enable it ?

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      Looks like the SSH service is not starting when you reboot the Ubuntu. To set it up so that it starts when you reboot the Ubuntu or Linux machine, run this BASH command in the terminal window.
      sudo systemctl enable ssh
      To manually start it use this command.
      sudo systemctl start ssh

  • @mohamedghida9540
    @mohamedghida9540 ปีที่แล้ว +1

    thank you , it was a great help of you, now i can connect to my RPI4 with pace of mind

  • @qiluua8228
    @qiluua8228 ปีที่แล้ว +2

    Bro, I have installed openssh server and the status is active but i still get this error connection refused !!

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +2

      Do you have a VPN running/setup on your client machine?

    • @rowdybruh4003
      @rowdybruh4003 ปีที่แล้ว +1

      Should I turn my vpn off?

    • @qiluua8228
      @qiluua8228 ปีที่แล้ว +1

      @@rowdybruh4003 turn off proxy and firewall

  • @LinkmanVN
    @LinkmanVN ปีที่แล้ว +1

    I got this problem on my orange pi. But how to access the system to repair without connection?

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      If the Orange Pi is physically accessible, connect a HDMI monitor to the Orange Pi, and install the OpenSSH server.
      If it is an Android based Orange Pi, you can use xRDP if you know the IP address.
      I hope it helps.

  • @Salah-YT
    @Salah-YT ปีที่แล้ว +2

    ur amazing bro thank u so much I fix it because of ur video thx

  • @servercluster
    @servercluster ปีที่แล้ว +3

    When I enter the password it say "permission denied and try again" can u help me with that😭

    • @SCLEDONFF
      @SCLEDONFF 6 หลายเดือนก่อน

      do in root

    • @FIREHEX931
      @FIREHEX931 5 หลายเดือนก่อน

      Wrong passwd cause it can ask you for your root pass and the normall ubuntu/kali user pass

  • @namhtrg2045
    @namhtrg2045 8 หลายเดือนก่อน +1

    Hello sir, what if my ubuntu server has installed the openssh, but it still refuse my connect when I try to connect to the server by another ubuntu device (in VM too), how to solve this problem? Tysm

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  8 หลายเดือนก่อน +2

      If your VM is sharing the same IP address as your base computer and both VM and base computer is using port number 22, then you will get into a pickle. There are essentially 2 ways to solve this problem.
      1) Make your VM NIC card as NAT, and that way your VM will receive a different IP address from base computer.
      2) Change your base computer SSH port number to say 123 in /etc/ssh/sshd_config using a text editor. After that restart the SSH service using the "service ssh restart" command or simply power cycle your base computer.
      I hope that helps, if not drop me another comment.

    • @namhtrg2045
      @namhtrg2045 8 หลายเดือนก่อน +1

      @@RabiGurungXybernetics tysmmmm, its worked, the first solution

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  8 หลายเดือนก่อน +1

      Awesome!

  • @harjeetmatharu256
    @harjeetmatharu256 ปีที่แล้ว +1

    I tried the same and it still shows - "connection refused".

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      If you're using Microsoft Windows, check your Windows Firewall.
      It is not recommended, but just as a test, disable all your firewalls for a moment, and then try connecting the SSH again.

  • @anishpunnen3643
    @anishpunnen3643 2 หลายเดือนก่อน +1

    Thank you so much for explaining it well

  • @danielgx83
    @danielgx83 3 หลายเดือนก่อน

    again i find another video showing connection refues on the windows side , instead the real issue is ssh into windows from a linux for example , it just wont work even if you reinstall the modules form powershell

  • @SigsSubo
    @SigsSubo 19 วันที่ผ่านมา

    What a legend! Thankyou!

  • @aphevee
    @aphevee ปีที่แล้ว

    How would i go about this for a centos server my centos server randomly stopped working for port 22 and it wont let me login but it says the status is online

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      For Centos, use these commands. Let me know if that works for you.
      Install OpenSSH server
      sudo yum install openssh-server
      Start the SSH service
      sudo systemctl start sshd
      Restart the SSH service
      sudo systemctl restart sshd
      Check the firewall status
      sudo firewall-cmd --state

  • @Priyakumari-eq6qg
    @Priyakumari-eq6qg 4 หลายเดือนก่อน

    When power off the VM ware then also found same problem again in cmd

  • @nelsonortega3019
    @nelsonortega3019 5 หลายเดือนก่อน +1

    Thank you! In my case only when starting the ssh service hahaha 🤦😂

  • @syr3472
    @syr3472 ปีที่แล้ว +1

    now why can't it work when I do Linux to windows

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      Can you run this command one more time in your Linux session (BASH environment).
      sudo apt install openssh-server
      This installs OpenSSH Server package in your Linux machine.
      Also make sure there is no error when you run this command.
      Also to make sure that the SSH Server (in the Linux machine) is indeed running, run this command. It should show a message in greed "active (running)".
      systemctl status ssh
      If that checks out, but still not able to establish SSH connection, make sure that the firewall is not running in your Linux machine. Using this command.
      ufw status
      It should output "Status: inactive" to indicate firewall in the Linux machine is disabled.
      Also make sure that your Windows firewall is turned off for this test.
      Either one of these debugging method should fix the problem.

  • @cameronyoung4148
    @cameronyoung4148 ปีที่แล้ว +2

    Well explained, thank you!

  • @gourikanisha801
    @gourikanisha801 ปีที่แล้ว +1

    Sir network connection timed out error in mobaxterm.plz tell me how to solve fix this problem

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      There could be an array of things that might be blocking your access.
      1) Is the SSH server installed in your remote machine?
      2) What SSH server are you using?
      3) From your client machine are you able to do ping to the remote machine?
      4) Is there firewall setup in the remote machine? Try these commands if you are using Linux system. Works in Debain too.
      a) Show all app with firewall access
      ufw app list
      b) Allow SSH access.
      sudo ufw allow ssh
      You can also allow via port number is it is a customized port number.
      sudo ufw allow 22
      NOTE that ufw is not always available in most Linux system. To install ufw, use this command.
      Update system files first...
      sudo apt-get update && sudo apt-get upgrade
      Then install UFW package.
      sudo apt-get install ufw
      I hope that gets you in the right direction in debugging your issue. If not, drop us a message again.
      Cheeers!

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      How did you fair on these questions?

  • @sheivongamboa
    @sheivongamboa ปีที่แล้ว +1

    very well great job.... keep up the good works

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      Thank you for your uplifting comment on my TH-cam channel. Your words put a smile on my face and brightened my day. I truly appreciate your continued support. Wishing you all the best!

  • @idriss_IT
    @idriss_IT 5 หลายเดือนก่อน +1

    Thanks man! I appreciate it

  • @faruk8247
    @faruk8247 ปีที่แล้ว +1

    I watched many explanations about the hetzner 22 port solution, but none of them was a solution, putty does not login, only Bitvise SSH Client logs in, not with the root password sent to your e-mail address, you can log in when you create a root password from the hetzner panel, I solved the solution in this way

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      Thanks leaving your alternate solution to resolving the issue. Much appreciate your comments 🙏

    • @Cagitay
      @Cagitay 11 หลายเดือนก่อน

      başkan tam olarak nasıl çözdün anlatabilir misin? ben de hetznerden aldım server'ı port 22 connectio time out sorunu yaşıyorum

  • @akramraja9010
    @akramraja9010 ปีที่แล้ว +1

    Where u typing this command

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      The black screen with large fonts are in Command Prompt, and and black screen with smaller fonts are in VMWare Player console session.
      I hope that answers your question.

    • @akramraja9010
      @akramraja9010 ปีที่แล้ว

      @@RabiGurungXybernetics i buyed vps at 14$ now it not connecting

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว

      Sorry I did not understand your question.
      Do you have a bit more detail?

  • @anupsingh2615
    @anupsingh2615 9 หลายเดือนก่อน +1

    Sshd is not running

    • @anupsingh2615
      @anupsingh2615 9 หลายเดือนก่อน

      What's the solution

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  9 หลายเดือนก่อน +1

      What error message I getting?

    • @anupsingh2615
      @anupsingh2615 9 หลายเดือนก่อน +1

      When I run status command to check sshd status it keep showing sshd is not running
      And unrecognized
      Sshd re-exec path

    • @anupsingh2615
      @anupsingh2615 9 หลายเดือนก่อน +1

      To check ssh status then keep showing all these sshd errors

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  9 หลายเดือนก่อน +1

      There are couple of thing you can do and check.
      1) Try restarting SSH Service with this command.
      sudo service ssh restart
      If you're using a system with systemd (daemon), you can use this command
      sudo systemctl restart ssh
      2) Check log file
      The SSH log file is located here. Open using any text editor. Alternatively you can use cat, more or less BASH command. I am using Nano as text editor here in the command below.
      sudo nano /var/log/auth.log
      3) Check SSH configuration
      Using a textt editor check your SSH configuration file. I am using nano as a text editor in the command below. vi and vim will work as well. Check paths in particular.
      sudo nano /etc/ssh/sshd_config
      4) Make sure the permission to SSH configuration file correct. I normally have my ssh configuration file as follows.
      sudo chmod 600 /etc/ssh/sshd_config
      sudo chmod 700 /var/run/sshd
      **** WORST CASE SENARIO ****
      Worst case scenario, reinstall SSH. Make sure that you have console access when doing this.
      sudo apt-get remove openssh-server
      sudo apt-get install openssh-server
      I hope that helps. Good luck!

  • @sergoMD
    @sergoMD 10 หลายเดือนก่อน +1

    you are the best !!!! tanks !

  • @danielajoycortez7591
    @danielajoycortez7591 6 หลายเดือนก่อน

    how to know my user@ip's password?

  • @FarizAzim
    @FarizAzim ปีที่แล้ว +1

    Thank you brother

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +2

      Thank you so much for your comment! I'm glad my video was helpful to you in resolving the SSH connection refused error on port 22. If you have any other questions or topics you'd like me to cover, feel free to let me know. Thanks again for watching!

  • @xavierrodriguezgarcia928
    @xavierrodriguezgarcia928 ปีที่แล้ว +1

    good job bro, lots of thanks

  • @Zakaria-nz5rc
    @Zakaria-nz5rc 3 หลายเดือนก่อน +1

    thank you

  • @SebastianMichaelis14325
    @SebastianMichaelis14325 ปีที่แล้ว +1

    Finally, Thank You :) :)

  • @linhdang6713
    @linhdang6713 ปีที่แล้ว +1

    thanks mate!

  • @xd4rkyy10
    @xd4rkyy10 7 หลายเดือนก่อน +1

    thanks rabi!

  • @rhayansilva
    @rhayansilva ปีที่แล้ว +1

    Very very tanks

  • @Ldenlord
    @Ldenlord ปีที่แล้ว +1

    what's the password?????

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      Not too sure what password you are referring to. But if you are talking about the SSH password, that will be what you had configured when you initially create your Linux box or VPS.

  • @Payer_01-Technofan
    @Payer_01-Technofan ปีที่แล้ว +1

    useless
    if you doesn't install it doesn't work

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      If you are referring to installing Open SSH server, unfortunately, you do need to install an SSH server to sole capacity to get the SSH service, so that the SSH client can connect to the remote Linux machine.

  • @cloudy2063
    @cloudy2063 2 หลายเดือนก่อน

    thx you

  • @memoabbas9055
    @memoabbas9055 ปีที่แล้ว

    did'nt work

  • @shawnschaworski2132
    @shawnschaworski2132 10 หลายเดือนก่อน +1

    how am i supposed to type commands if i cant access ssh lol

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  10 หลายเดือนก่อน +1

      When you try to access the ssh, what error do you get in your command prompt?

  • @paragchaudhari4370
    @paragchaudhari4370 ปีที่แล้ว +1

    Make it full screen bc

    • @RabiGurungXybernetics
      @RabiGurungXybernetics  ปีที่แล้ว +1

      Thank you for your constructive feedback. Will take note of it and apply that in my next video.
      Thanks for leaving comment on my channel.