SFTP client not working on Apalis i.MX8

Hello All,

We are using toradex reference multimedia image on Apalis i.MX8. We are trying to use SFTP for communication.
The SFTP server on the i.MX8 is working fine. i.e. we are able to connect to the device from other machine with SFTP.

prathmesh_kulkarni@L-Prathmesh-Kulkarni:~$ sftp root@172.30.0.110
Connected to 172.30.0.110.
sftp>

But SFTP client on the i.MX8 is not working. i.e. we are not able to connect using SFTP client on the device with other SFTP server. The connection gets terminated immediately after connecting to the server.
Below are the logs for reference.

root@apalis-imx8-06980499:~/test_eth# sftp aditya@172.16.2.92
/usr/bin/ssh: Ignoring unknown configuration option 'ForwardX11 no'
/usr/bin/ssh: Ignoring unknown configuration option 'ForwardAgent no'
/usr/bin/ssh: Ignoring unknown configuration option 'PermitLocalCommand no'
/usr/bin/ssh: Ignoring unknown configuration option 'ClearAllForwardings yes'
/usr/bin/ssh: Ignoring unknown configuration option 'Protocol 2'
WARNING: Ignoring unknown option --
aditya@172.16.2.92's password: 
Connected to 172.16.2.92.
sftp> 
root@apalis-imx8-06980499:~/test_eth# 
root@apalis-imx8-06980499:~/test_eth#

Please help us to resolve this issue.

Regards,
Prathamesh Kulkarni

he logs you provided show that the SSH client on the i.MX8 is ignoring some configuration options and there is a warning about an unknown option.

  • Please check the SSH configuration-: The SSH client and server may have incompatible configuration options.
  • Check the SSH client and server versions: Make sure that the SSH client and server versions are compatible with each other.
  • Enable debugging by using -v options (i.e. sftp -v aditya@172.16.2.92)
  • Check the logs on the SSH server you are trying to connect to.

Hello @alex.tx ,

We checked above mentioned details.

  1. ssh_config file looks like below.
root@apalis-imx8-06958964:~# cat /etc/ssh/ssh_config 

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Include /etc/ssh/ssh_config.d/*.conf

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
  1. Both the client and server have same version for SFTP i.e. version 3.
  2. Below are debug logs.
root@apalis-imx8-06958964:~# sftp -v aditya@172.16.2.92
/usr/bin/ssh: Ignoring unknown configuration option 'ForwardX11 no'
/usr/bin/ssh: Ignoring unknown configuration option 'ForwardAgent no'
/usr/bin/ssh: Ignoring unknown configuration option 'PermitLocalCommand no'
/usr/bin/ssh: Ignoring unknown configuration option 'ClearAllForwardings yes'
WARNING: Ignoring unknown option -v
/usr/bin/ssh: Ignoring unknown configuration option 'Protocol 2'
WARNING: Ignoring unknown option --
aditya@172.16.2.92's password: 
Connected to 172.16.2.92.
sftp> 
root@apalis-imx8-06958964:~#

Thanks,
Prathamesh Kulkarni

Hi @alex.tx ,

Could you please share your inputs on these results shared here SFTP client not working on Apalis i.MX8 - #3 by prathamesh.kulkarni?

Thanks,
Prathamesh Kulkarni

Please provide content of all .conf files in /etc/ssh/ssh_config.d/