0

I have ubuntu 16.04 laptop, And I want to ssh it from a different network. my router is tp-link AC750. I enabled port forwarding, as in the image enter image description here

I found my public ip address using google and tried to login remotely, but not working. How can I troubleshoot this?

I modified to port 2222. now getting the following error while trying to connect:

debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
ssh_exchange_identification: read: Connection reset by peer
  • 2
    When firing up ssh, use -v flag for verbose output. You can then clearly see what exactly went wrong. – honza-kasik Nov 24 '18 at 17:25
  • 2
    Might be a silly question but: do you have an sshd (like openssh-server) running on your laptop? I ask because it is not installed by default. – PerlDuck Nov 24 '18 at 17:32
  • 2
    try with another port on external, many routers don't forward external 22 (also 80, 443). try with eg 2222 forward to 22 on your computer and you MUST test it outside your router network, you can't test it from internal. of course like @PerlDuck said, check if your destination is listening on port 22 from all networks netstat -anutp grep :22 to check. – Zina Nov 24 '18 at 17:39
  • @PerlDuck : I checked. ssh is running. – thomachan Nov 24 '18 at 18:20
  • @Zina : that moved me a little forward: now I am getting a different error: see edit – thomachan Nov 24 '18 at 18:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.