Can't connect to my SSH server?

I tried for the first time to setup a ssh server following these steps on the server machine:

  1. Following this article, I installed sudo apt install openssh-server
  2. Following this question, I edited /etc/ssh/sshd_config and appended
    Port 22
    PermitRootLogin no
    AllowUsers usr
  3. Following the first article, sudo systemctl restart sshd.service
  4. Following this article I found my external IP address ip-add using this
  5. I tried to ssh from my server machine to the machine itself with ssh usr@ip-add

However I got this error message:

ssh: connect to host ip-add port 22: Connection refused
12

1 Answer

I solved the problem by creating a port-forwarding on my router.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like