LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-13-2020, 07:49 AM   #1
aclarck
LQ Newbie
 
Registered: Aug 2016
Location: Belgium
Distribution: debian & linuxmint
Posts: 4

Rep: Reputation: Disabled
ssh over wifi failed (connection reset) but ssh over the wire is ok


I am trying to ssh via wifi from 192.168.0.10 into a synology server. (192.168.0.11)

The connection is failing when started from a NUC via wifi(192.168.0.10 - wlp2s0)
The connection is ok when started from the same NUC but via the wire (enp0s25).

When started from any other machines (even another NUC) the SSH connection is successful (wifi)

I tried with 2 distros (mint19.2 and debian10) but the problem is still the same. I always got: "ssh_exchange_identification: read: Connection reset by peer" when the connection is tarted from the NUC 192.168.0.10.
I even tried to use another wifi usb key but it is still the same.
I also tried to give another IP address to this NUC but problem is the same.

What is driving me crazy is that when I started to SSH from 192.168.0.10 to another machine (eg. 192.168.0.107) it is ok

So, to resume, I can NOT connect via wifi from 192.168.0.10 to 192.168.0.11
But I can connect via wifi from any other machine to 192.168.0.11

Here below the ouput from 192.168.0.10:

ssh -vvv 192.168.0.11
OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d 10 Sep 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.0.11 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.0.11 [192.168.0.11] port 22.
debug1: Connection established.
debug1: identity file /home/carex/.ssh/id_rsa type 0
debug1: identity file /home/carex/.ssh/id_rsa-cert type -1
debug1: identity file /home/carex/.ssh/id_dsa type 1
debug1: identity file /home/carex/.ssh/id_dsa-cert type -1
debug1: identity file /home/carex/.ssh/id_ecdsa type 2
debug1: identity file /home/carex/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/carex/.ssh/id_ed25519 type 3
debug1: identity file /home/carex/.ssh/id_ed25519-cert type -1
debug1: identity file /home/carex/.ssh/id_xmss type -1
debug1: identity file /home/carex/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
ssh_exchange_identification: read: Connection reset by peer
ca@nuc:~$

Here below the output from 192.168.0.109:

ca@ux31:~$ ssh -v 192.168.0.11
OpenSSH_7.4p1 Debian-10+deb9u7, OpenSSL 1.0.2u 20 Dec 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.11 [192.168.0.11] port 22.
debug1: Connection established.
debug1: identity file /home/carex/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/carex/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/carex/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/carex/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/carex/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/carex/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/carex/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/carex/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.11:22 as 'carex'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:z0DAQErw+BC6hRmmSczy83VyunS5ILpweivBPDafzYs
debug1: Host '192.168.0.11' is known and matches the ECDSA host key.
debug1: Found key in /home/carex/.ssh/known_hosts:2
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/carex/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.0.11 ([192.168.0.11]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
syn1>

I think it is time for me to retire and go fishing !
But before doing that I would like to understand what is happening.
 
Old 02-13-2020, 05:57 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
You could try running the SSH server in debug mode to understand why it closes the connection.
 
Old 03-01-2020, 03:41 AM   #3
aclarck
LQ Newbie
 
Registered: Aug 2016
Location: Belgium
Distribution: debian & linuxmint
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for the tip. I will try the server debug mode eventually if may get a root access on the synology.
For now I just replaced the TP-L router by a new Netgear router and it solved the problem.
I may now again access the synology from the nuc via a wifi ssh connection.

I hope I will have the possibility to place sshd on the synology in debug mode in the coming days and find the cause of the problem (connection reset by peer). Because it is really bothering me.
And I will post the results.

Last edited by aclarck; 03-01-2020 at 03:43 AM.
 
Old 03-01-2020, 03:57 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,335
Blog Entries: 3

Rep: Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731
If you have shell access and can get root there, then it is easy to fire up a second instance of the SSH daemon:

Code:
/usr/sbin/sshd -p 5678 -d
Then connect to the port given above by the -p option. You can add up to three -d options for increasing levels of verbosity.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace 3 wire fan with 4 wire fan ? Fixit7 Linux - Hardware 4 03-28-2014 06:56 AM
Install ruby gems - connection reset, connection reset..... deco81 Linux - Software 1 06-16-2010 04:47 PM
SSH fatal: Read from socket failed: Connection reset by peer humbletech99 Linux - Networking 3 01-03-2007 06:41 PM
40 wire vs 80 wire rkelsen Linux - Hardware 1 07-04-2006 05:24 PM
10 wire RJ-45 not 8 wire? farhan Linux - Networking 0 11-11-2003 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration