0

After executing:

ssh demo@localhost -p 10022 -v     

The trace looks like this:

 OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: /etc/ssh/ssh_config line 52: Applying options for *
debug1: Connecting to localhost port 10022.
debug1: Connection established.
debug1: identity file /Users/user/.ssh/id_rsa type 0
debug1: identity file /Users/user/.ssh/id_rsa-cert type -1
debug1: identity file /Users/user/.ssh/id_dsa type -1
debug1: identity file /Users/user/.ssh/id_dsa-cert type -1
debug1: identity file /Users/user/.ssh/id_ecdsa type -1
debug1: identity file /Users/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/user/.ssh/id_ed25519 type 3
debug1: identity file /Users/user/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/user/.ssh/id_xmss type -1
debug1: identity file /Users/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: read: Connection reset by peer
2
  • 1
    It appears you're trying to connect to port 10022 on your localhost. Unless you have port 10022 port forwarded to your VM's SSH port, it's always going to fail. Get the VM's IP and replace localhost with that. Is there a particular reason you're using 10022 instead of 22?
    – Havegooda
    Commented Sep 11, 2019 at 17:25
  • Thanks for the quick response.I have added a rule in the point forwarded: host port 10022, guest host 22 and I have left the host IP and guest IP empty. Commented Sep 11, 2019 at 17:27

0

You must log in to answer this question.

Browse other questions tagged .