SFTP times out, but the file appears normally?

Advertisement

pilum
Joined:
Posts:
3

SFTP times out, but the file appears normally?

Our Linux server is configured to allow SFTP. We can use SFTP from old accounts.
But some new user accounts have been created, and they encounter a strange issue when attempting an SFTP copy to the server. It is a difficult problem to search for.
When I try to send a SMALL file to the users home directory (logged in as that user) via SFTP the log file shows the following:
. 2024-06-17 13:20:26.217 SCP remote side confirmation (0)
. 2024-06-17 13:20:26.217 Sending BINARY data (first block, 2043 bytes)
. 2024-06-17 13:20:26.217 Sending NULL.
. 2024-06-17 13:20:41.341 Waiting for data timed out, asking user what to do.
But if I press the "Abort" button, then log back on again, I can see the full file in the users directory.

Reply with quote

Advertisement

pilum

I should mention that these new accounts are accessed via Cyberark (Privileged Access Management Tool). While the old account was a regular direct login.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,262
Location:
Prague, Czechia

Re: sftp times out, but the file appears normally?

Note that the log indicates that you are using SCP protocol, not SFTP. Maybe it's by mistake? Maybe the SCP is broken on the server and you are using it by mistake/misconfiguration with the new accounts. While really using SFTP with the old accounts.
Post complete logs both for old and new account, if you need further help.

Reply with quote

pilum
Joined:
Posts:
3

Thank you for your reply.

Here is some more testing. Let me know if you need more complete logs than this.

This works from the command line:
scp filename.xsl user@account@CAid@ip:/home/account
When I connect via my old (non-Cyberark) account then it works and the WinSCP log looks like this:
. 2024-06-21 08:24:29.813 Copying "C:\filename.xsl" to remote directory started.
. 2024-06-21 08:24:29.813 Binary transfer mode selected.
. 2024-06-21 08:24:29.814 Opening remote file.
> 2024-06-21 08:24:29.814 Type: SSH_FXP_OPEN, Size: 56, Number: 10243
< 2024-06-21 08:24:29.814 Type: SSH_FXP_STATUS, Size: 24, Number: 9988
. 2024-06-21 08:24:29.814 Discarding reserved response
< 2024-06-21 08:24:29.817 Type: SSH_FXP_HANDLE, Size: 13, Number: 10243
> 2024-06-21 08:24:29.818 Type: SSH_FXP_WRITE, Size: 2068, Number: 10758
> 2024-06-21 08:24:29.818 Type: SSH_FXP_CLOSE, Size: 13, Number: 11012
> 2024-06-21 08:24:29.818 Type: SSH_FXP_SETSTAT, Size: 52, Number: 10505
< 2024-06-21 08:24:29.820 Type: SSH_FXP_STATUS, Size: 24, Number: 10758
< 2024-06-21 08:24:29.820 Status code: 0
< 2024-06-21 08:24:29.820 Type: SSH_FXP_STATUS, Size: 24, Number: 11012
< 2024-06-21 08:24:29.820 Status code: 0
. 2024-06-21 08:24:29.820 Preserving timestamp [2019-03-04T22:23:25.000Z]
< 2024-06-21 08:24:29.822 Type: SSH_FXP_STATUS, Size: 24, Number: 10505
< 2024-06-21 08:24:29.822 Status code: 0
. 2024-06-21 08:24:29.822 Transfer done
When I try via new Cyberark Account the WinSCP log looks like this:
< 2024-06-21 08:38:22.672 WinSCP: this is begin-of-file
. 2024-06-21 08:38:22.690 SCP remote side confirmation (0)
. 2024-06-21 08:38:22.690 File: "C:\filename.xsl"
. 2024-06-21 08:38:22.692 File: 'C:\filename.xsl' [2019-03-04T22:23:25.000Z] [2043]
. 2024-06-21 08:38:22.692 Copying "C:\filename.xsl" to remote directory started.
. 2024-06-21 08:38:22.692 Binary transfer mode selected.
> 2024-06-21 08:38:22.693 T1551738205 0 1718342106 0
. 2024-06-21 08:38:22.749 SCP remote side confirmation (0)
> 2024-06-21 08:38:22.749 C0644 2043 filename.xsl
. 2024-06-21 08:38:22.788 SCP remote side confirmation (0)
. 2024-06-21 08:38:22.788 Sending BINARY data (first block, 2043 bytes)
. 2024-06-21 08:38:22.788 Sending NULL.
. 2024-06-21 08:38:37.896 Waiting for data timed out, asking user what to do.

Reply with quote

martin
Site Admin
martin avatar

As I suggested above, you are using SFTP with the old account, but SCP with the new account.
Try to use SFTP with the new account. Or maybe you do, but WinSCP falls back to SCP, because SFTP does not work with the new account. I cannot tell, as you didn't post completes log I was asking for.

Reply with quote

Advertisement

You can post new topics in this forum