PSMP with the use of WinSCP: Common Errors

PSMP with the use of WinSCP: Common Errors

407
Created On 11/10/26 10:58 AM - Last Modified 11/10/26 15:57 PM


Symptom


End Users attempts to connect through PSM for SSH using WinSCP; and WinSCP reports one of the following errors: 

1) 
Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended)."
 

2)

 Cannot initialize SFTP protocol. Is the host running an SFTP server?"


Once/If a session is established and a file transfer is attempted it fails:

Host is not communicating for more than 15 seconds.
Still Waiting...
 

Note: If the problem repeats; try turning off 'Optimize connection buffer size'.

image.png

Clicking "Abort" or waiting additional time; this will eventually fail with:

Copying file 'name_of_file' fatally failed.
Copying files to remote side failed.

2) When WinSCP is configured with "Use scp2 with scp1 compatibility" the error received:

Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. 
You may also try SFTP instead of SCP.
Command failed with return code 255.
 


Environment


11.7;12.0;14.6

PSM for SSH
Connection Components:
PSMP-SSH <- Behavior: Allows WinSCP to navigate the target, but cannot transfer files.
PSMP-SCP <- WinSCP will not utilize SCP in a method PSMP can recognize, and this connection component is never initialized.
PSMP-SFTP <- Correct connection component to use with WinSCP

WinSCPConfigured:
File Protocol: "SCP"
Shell: "Default" or "/bin/bash"
SFTP "Allow SCP fallback" is selected. (Issue: PSMP or Target is not configured for usage with SFTP, causing failback)
"Use scp2 with scp1 compatibility" is selected



Cause


WinSCP is incorrectly configured to use SCP.
Although PSMP supports the use case of SCP via the command line, PSMP does not support the method in which WinSCP invokes scp for it's usage (https://winscp.net/eng/docs/requirements#scp WinSCP performs the SCP command similar to: scp -r -1 -d -t <file context> and can not be parsed through PSM for SSH correctly.)

The CyberArk documentation states the following: 
"You can use native SFTP clients, such as WinSCP and FileZilla, or the SCP command from your desktop to securely transfer files through PSM for SSH."

The example then provided shows the File Protocol configured with: SFTP
WinSCP supports both the SFTP and SCP protocols, but our documentation only mentions WinSCP usage with the SFTP protocol.

Additional information, and explanation of SCP and SFTP with the use of SSH, to avoid some common misconceptions/ (Link is external to CyberArk) SSH and File Transfers (scp and sftp)



Resolution


Configure WinSCP to use the PSMP-SFTP Connection Component workflow:

The above errors are typically tied to the following configuration pieces:

WinSCP Configuration:

1) File Protocol in use is SFTP:

image.png

Advanced Site Settings "Allow SCP fallback" is unchecked"
image.png

Shell: /bin/bash

image.png
 

PSM for SSH Configuration:

1) Ensure that the account's assigned platform has the PSMP-SFTP connection component enabled and available for usage.
2) On the PSMP Server and Target System, ensure that /etc/ssh/sshd_config is configured for PSMP-SFTP usage with the following line uncommented (Changes require a sshd service restart):

subsystem sftp /usr/libexec/openssh/sftp-server 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj000000155lCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail