* * *

Author Topic: Cannot connect via Synapse and SSH to a linux box  (Read 12305 times)

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #15 on: October 08, 2016, 07:25:50 am »
I have 2 other machines at home with the following errors:

box3: ubuntuserver
Code: Pascal  [Select]
  1. OpenSSL 1.0.1f 6 Jan 2014
Error: Error connecting to SSH server ubuntuserver:22 as user pascal. Technical details: No algorithm compatible with the remote system's selection was found: 'aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com'

box5: kodi
Code: Pascal  [Select]
  1. LibreSSL 2.2.6
Error: Error connecting to SSH server kodi:22 as user root. Technical details: No algorithm compatible with the remote system's selection was found: 'chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com'
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Thaddy

  • Hero Member
  • *****
  • Posts: 4805
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #16 on: October 08, 2016, 07:38:17 am »
The servers do not recognize the protocols.
The openssl one really needs updating.
On ubunto do sudo apt-get update suso apt-get upgrade
You really need to update your encryption libraries.
I can not help you in any meaningful way if you don't update.
You also need to update libressl to 2.4.3.

After that we can take the next step.

Except maybe for the really old openssl versions from 2008 and 2009 your package manager should install a version that is up to date since security packages are often back-ported.
Even if it is an otherwise non-maintained distribution!
The openssl version number should be 1.0.0t or higher.

The reason being that many protocols have been added and some protocols are disabled or removed for security reasons.

Also note you have only one of the four boxes correctly configured: the one that drops the connection without answer.
First update. The latter will come later.
« Last Edit: October 08, 2016, 07:50:39 am by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #17 on: October 08, 2016, 08:10:41 am »
On ubunto do sudo apt-get update sudo apt-get upgrade
I did but openssl version is still the same :-(
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #18 on: October 08, 2016, 08:17:25 am »
But why is putty able to connect to these machines without any problems?
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Thaddy

  • Hero Member
  • *****
  • Posts: 4805
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #19 on: October 08, 2016, 11:28:57 am »
PuTTy uses its own non-standard type of certicicate, although the handshake is standard.
Are you by any chance using PuTTy's certificates? Then that may be the cause. SSH <> PuTTy in this case.
I am pretty sure we narrowed it down to a certificate issue as the main culprit.

See https://help.ubuntu.com/community/SSH/OpenSSH/Keys

Since you are using very old encryption on at least three of those boxes don't choose a keylength of 2048 or 4096 at first. First try 1024, the try with 2048 and hopefully 4096 will also work on your servers.
« Last Edit: October 08, 2016, 11:34:03 am by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #20 on: October 08, 2016, 12:34:16 pm »
Since you are using very old encryption on at least three of those boxes don't choose a keylength of 2048 or 4096 at first. First try 1024, the try with 2048 and hopefully 4096 will also work on your servers.

How can i do this with the sample code/synapse?
Sorry, but i do not have any knowledge of using SSH, SSL and encryption!
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #21 on: October 09, 2016, 08:31:30 am »
Are you by any chance using PuTTy's certificates? Then that may be the cause.

No, as i installed putty a while after i tried to connect to those linux boxes (at least at home).
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Thaddy

  • Hero Member
  • *****
  • Posts: 4805
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #23 on: October 10, 2016, 06:17:14 am »
Didn't work:
Error connecting to SSH server kodi:22 as user root. Technical details:
Error connecting to SSH server ubuntuserver:22 as user pascal. Technical details:


Can anybody connect to SSH servers on linux machines using synapse, or any other pascal source code?
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Thaddy

  • Hero Member
  • *****
  • Posts: 4805
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #24 on: October 10, 2016, 06:41:28 am »
Yes I can. I do it on a daily basis. The example works, afaik. I use a slightly different one but the wiki example works if all requirements are properly installed.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #25 on: October 10, 2016, 07:51:40 am »
Do you use cryptlib or openssl? And do you connect from Windows?

If you use openssl on windows, can you send me your bindings and dlls?
« Last Edit: October 10, 2016, 11:05:56 am by Pascal »
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

rvk

  • Hero Member
  • *****
  • Posts: 2974
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #26 on: October 10, 2016, 11:14:56 am »
@Pascal, what version of Synapse did you use?
You should use the SVN version and not the stable release no. 40.

Thaddy

  • Hero Member
  • *****
  • Posts: 4805
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #27 on: October 10, 2016, 11:20:24 am »
Get it here https://sourceforge.net/p/synalist/code/HEAD/tree/trunk/ download snapshot

or if you have svn installed:
svn co https://svn.code.sf.net/p/synalist/code/trunk synapsetrunk
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #28 on: October 10, 2016, 11:34:46 am »
I already use the svn trunk version!
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Thaddy

  • Hero Member
  • *****
  • Posts: 4805
Re: Cannot connect via Synapse and SSH to a linux box
« Reply #29 on: October 10, 2016, 12:45:49 pm »
In this case did you really, really, honestly follow up on my instructions because I am unable to replicate the issue on multiple server platforms.

I tested armhf client to windows server. armhf client to armhf server. armhf client to linux x86_64 server, linux-x86_64 client to linux-x86_64 server windows 10-64 to linuxx86_64 server and they all work with the example code and properly installed certificates. See the link on how to do that and do not out-smart those instructions.

I can't help more than I did. Simply put: I spend hours on it and can't replicate it.

Note I have synapse SSH code using openssl running in production code for high-level clients. I mean top 500 banks. Many people here know that.
« Last Edit: October 10, 2016, 12:50:55 pm by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus