SFTP log says the conn shuts down after shell/command

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
IngemarS
500 Command not understood
Posts: 4
Joined: 2022-10-07 16:48
First name: Bo Ingemar
Last name: Skarpås

SFTP log says the conn shuts down after shell/command

#1 Post by IngemarS » 2022-10-07 17:35

Hi everybody listen in...
I am trying to set up FZ, and using the newest Windows version downloaded yesterday. I am still with this computer on W7U with all SP:s.
I have been using FZ since around 2005. But mainly with regular FTP.
The last few years I have used FTP with TLS to f ex other weather services I send data to. FTPS has been used in my in my local network towards
a NAS.

Now I want FTPS to work towards my new ISP/web hotel.

The non-standard port of 2020 is let through the router. Yeah I know 22 is/was the std.

I used PuttyGen to create priv/pub files, but without encryption/passphrase.

When I run the FZ configuration with login with "key file" it goes ok according to the debug log until:

2022-10-07 16:58:17 11240 1 Trace: Sent public key signature
2022-10-07 16:58:17 11240 1 Trace: Access granted
2022-10-07 16:58:17 11240 1 Trace: Opening main session channel
2022-10-07 16:58:18 11240 1 Trace: Opened main channel
2022-10-07 16:58:18 11240 1 Trace: Started a shell/command
2022-10-07 16:58:18 11240 1 Status: Connected to aaa.bbb.cc.ddd /* not showing the ip-address */
2022-10-07 16:58:18 11240 1 Trace: Got eof from child process
2022-10-07 16:58:18 11240 1 Trace: CControlSocket::DoClose(64)

I also tested WinSCP and I says something is wrong on the serverside but that nice support team has no says customers use
very similar setup.

When using PuTTY to connect to Command Line Interface it goes ok so far as I get the window and the user name prompt and then
when asked for password the cursor doesnt move but still I enter the pwd and hits enter and the CLI-window wanishes! (I dont recall
if CLI-window cursor should move when entering pwd I was a long time since I had to use remote CLI!

Ideas anyone?

Thanks for any assistance including suggestions of test to validate my own environment!

With regards,

IngemarS

User avatar
boco
Contributor
Posts: 26910
Joined: 2006-05-01 03:28
Location: Germany

Re: SFTP log says the conn shuts down after shell/command

#2 Post by boco » 2022-10-07 20:24

One moment please... There is some confusion here.

FTP with added encryption layer is called FTPS (FTP over TLS). FTPS in Explicit mode uses the same port as FTP by default, which is 21. Implicit mode uses 990 instead.
Port 22 is used by a completely different and unrelated protocol, called SSH2. FileZilla supports, through modified PuTTY components, only the file transfer subsystem of SSH2, called SFTP. Despite the similar name, SFTP and FTPS have absolutely nothing to do with each other.

So, first, what does your ISP require, FTPS or SFTP? Also, port forwarding is only required for incoming connections (if you did run a server).

According to the log, the server's SFTP support is not working (or the SFTP subsystem is not even enabled). It wants to start a shell, but FileZilla doesn't support the remote shell at all.

You should really try with FTPS, usually that's also available (port 21?).
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

IngemarS
500 Command not understood
Posts: 4
Joined: 2022-10-07 16:48
First name: Bo Ingemar
Last name: Skarpås

Re: SFTP log says the conn shuts down after shell/command

#3 Post by IngemarS » 2022-10-07 22:41

Thanks, sorry for any confusion. I have been trying back and forth for two days to get things to work, so I an exhausted. I will review what I wrote tomorrow and see what mistakes in the different ftp abbreviations I made.
It is almost 1 AM here.

Thanks for pointing out any mistakes!

IngemarS

IngemarS
500 Command not understood
Posts: 4
Joined: 2022-10-07 16:48
First name: Bo Ingemar
Last name: Skarpås

Re: SFTP log says the conn shuts down after shell/command

#4 Post by IngemarS » 2022-10-08 08:46

Thanks boco,

Yes I know the difference between them, but may have been unclear in what I wrote. I really could have left the other out of the description and only referred to SFTP.

Why did I mention the others? Because I run several computers here to have redundancy and they use different techniques, inclusive legacy software to make that happen. In a near future I will have two separate weatherstations to have even more redundancy, and also later on even two paths over to internet...

My ISP have FTP, FTPS of all kinds and I can deliver data with different types to different directories all with non-standard ports and that has proved to be no problem at all!
However, with SFTP it can only go to one specific directory and via port 2020.

I have had confirmation via outside port pinging that the 2020 port is open. Besides creating public and private RSA SSH-2 files, I have always seen SFTP as more simple to
configure in a client, and have done so with success to NAS and my own little RPI FTP server. I have a bunch of RPIs.

In FileZilla I have configured:
General:
Protocol: SFTP - SSH File Transfer Protocol
Host: tried ip number and host name - verified to be correct by ISP
Logon type: Key file
User: corret name according to ISP
Key file: ok public part view to be correct and the log level as Dump says that part goes ok!
Advanced:
Server type: Default (Autodetected) - for most of my attempts but also closest name match to ISP's system
Default local directory: correctly set - same specs as when I use FTP or FTPS.
Default remote directory: tested alternatives - empty, /domains, /home/accountname, /home/accountname/domains et c.
Transfer Settings:
Limit.. checked Max no conns: 1

The one thing that makes me wonder is: since I use cell base/mobile internet connection FTP takes just over 2 secs to connect properly,
but with SFTP including the fact that it goes wrong it takes between 6an 7 secs to get that far. ISP says that there is no timeout
that effects that way?

No matter what I do I get the same last part of log indicating hopw far it goes ok and than indicating some kind of error:
2022-10-08 10:36:15 21240 1 Status: Using username "myaccoutname". (edited for security)
2022-10-08 10:36:15 21240 1 Trace: Offered public key from "E:\FileZilla_and_SSH_keys\RSA_Inleed_private.ppk"
2022-10-08 10:36:15 21240 1 Trace: Offer of public key accepted, trying to authenticate using it.
2022-10-08 10:36:15 21240 1 Trace: Sent public key signature
2022-10-08 10:36:15 21240 1 Trace: Access granted
2022-10-08 10:36:15 21240 1 Trace: Opening main session channel
2022-10-08 10:36:15 21240 1 Trace: Opened main channel
2022-10-08 10:36:15 21240 1 Trace: Started a shell/command
2022-10-08 10:36:15 21240 1 Status: Connected to aaa.bbb.cc.ddd (edited for security)
2022-10-08 10:36:15 21240 1 Trace: Got eof from child process
2022-10-08 10:36:15 21240 1 Trace: CControlSocket::DoClose(64)
2022-10-08 10:36:15 21240 1 Trace: CControlSocket::ResetOperation(66)
2022-10-08 10:36:15 21240 1 Trace: CSftpConnectOpData::Reset(66) in state 3
2022-10-08 10:36:15 21240 1 Error: Could not connect to server
2022-10-08 10:36:15 21240 1 Trace: CFileZillaEnginePrivate::ResetOperation(66)

Regards,

IngemarS

User avatar
botg
Site Admin
Posts: 35507
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: SFTP log says the conn shuts down after shell/command

#5 Post by botg » 2022-10-10 09:45

since I use cell base/mobile internet connection FTP takes just over 2 secs to connect properly,
but with SFTP including the fact that it goes wrong it takes between 6an 7 secs to get that far. ISP says that there is no timeout
that effects that way?
Slow hostname resolution perhaps?
2022-10-08 10:36:15 21240 1 Trace: Got eof from child process
Is the server's SFTP subsystem enabled and working properly?

IngemarS
500 Command not understood
Posts: 4
Joined: 2022-10-07 16:48
First name: Bo Ingemar
Last name: Skarpås

Re: SFTP log says the conn shuts down after shell/command

#6 Post by IngemarS » 2022-10-10 17:06

Thanks botg,

Yeah I thought it was to slow to allow the connection, but the problem actually was depending on an fault ISP manual. They used the same descriptions for all three different wweb services they have.
What I had not found out, and there was no real description of what they used. And they used OpenSSH. I could not see that in the FZ debug log.

They kept on saying produce a RSA key pair, but in Windows using PuTTYgen you will have to produce the RSA (-2) key pair, and then for OpenSSH you need to use puttygens menu option Conversions and choose OpenSSH.
Then everything went fine!

Thanks for trying to help mne oout!

Ingemars

Post Reply