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

preview_player
Показать описание
Learn how to resolve "Connection Refused" on port 22 error while trying to connect to a remote server via SSH. This error comes about for several reasons like...
* SSH service is not running
* SSH port (22) is blocked by the firewall
* SSH server is using a different port (other than default SSH port 22)

You can check your firewall status using the following command. And it is shows status as "inactive", the firewall is not an issue here.

sudo ufw status

Command Used In This Demo
1) Get IP Address of the Ubuntu or Debian
ip addr

2) List all packages installed in Ubuntu or Debian
sudo apt list --installed

3) Check if openssh package is installed in your Ubuntu or Debian
sudo apt list --installed | grep openssh-server

4) Check ssh service running in the Ubuntu or Debian
sudo service ssh status

5) Install OpenSSH server
sudo apt install openssh-server

6) Start OpenSSH service
sudo service ssh start

7) Restart OpenSSH service
sudo service ssh restart

8) Check firewall status in your Ubuntu or Debian
sudo ufw status

#ubuntu, #openssh, #debian, #VMWare,
Рекомендации по теме
Комментарии
Автор

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

fewselage
Автор

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

allnightgrinder
Автор

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

mohamedghida
Автор

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.

faruk
Автор

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

supersmart
Автор

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

sheivongamboa
Автор

Thank you so much for explaining it well

anishpunnen
Автор

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

Salah-YT
Автор

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

aykutyuzucu
Автор

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

nelsonortega
Автор

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

aphevee
Автор

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

leeannaadams
Автор

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

LinkmanVN
Автор

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

Priyakumari-eqqg
Автор

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

danielgx
Автор

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

qiluua
Автор

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

servercluster
Автор

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

namhtrg
Автор

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

harjeetmatharu
Автор

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

gourikanisha