I can connect to my server from my computer by ssh. I have internet connection. Everything works perfectly, but I can't connect to my server by ssh.

please check the screenshot for more information.

ip a

systemsctl status ssh.service

  • Can you paste here the command you are using and the result of it? – Daniel Marques Jun 27 '19 at 15:23

It's clearly says that your server is configured to listen on port 1337 instead of standard 22.

You should specify the port on your client side:

ssh -p 1337

OR edit /etc/ssh/sshd_config file and restart sshd service.

I checked the port and it's listening fine:

 telnet 1337
Connected to
Escape character is '^]'.
SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.