Question

connect to host 128.xxx.xxx.xx port 22: Connection refused

Posted September 15, 2014 77.5k views

Hello, I am new in using Digital Ocean Cloud server
I am using ubuntu 14.04 for host my multiple site. Firstly, I success for ssh connection.
Then I installed My SQL, Phpmyadmin, apache and secure them using this way :
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-14-04
and,
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04

I logged out, then tried to access again with ssh connection and I got :
ssh: connect to host 128.199.xxx.xx port 22: Connection refused.

I am using Ubuntu 14.04 in my dekstop.

Can anyone help me ?

3 comments

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers

Is your server even running ?
Are you able to ping to your server IP ?
Seems the SSHD service is shut down for some reason.
A reboot to the server might help.

Should I reboot my server through console ? I think it will cause my data corrupt.
When I ping it. It works, and when I access it show me apache default page.

Check your ports, run:

nano /etc/ssh/sshd_config

or

vi /etc/ssh/sshd_config

and you should see:

Port: 22

If it’s not “22”, but something like “2345”, then adjust your connection line. In Linux or OSX:

ssh -p 2345 your_username@your_droplets_ip_address
ssh -p 2345 root@123.123.123.123
Submit an Answer