Knowledge Search


How to configure WinSCP to connect to Junos Space

  [KB24972] Show Article Properties

This article assists with customer configurations of WinSCP in order to connect to Junos Space devices (JA1500, JA2500 and VM).
There are requirements from time to time to either add a file, or extract a file from Junos Space.  WinSCP is a Windows based application that allows this file transfer to occur over a secure channel.  The default settings out of the box for SCP are not supported, and hence the connection fails.

The goal is to have the WinSCP program successfully able to securely transfer files to and from Junos Space.

Below is a list of screens that highlight this failure for reference.
  1. Default WinSCP SSH settings: 

  2.  Check the 'Advanced Options' to make the following screen viewable.   Notice, the Shell variable in the top right hand corner is set to 'Default'.
  3. When using these settings to connect, you'll see the following process flow:
    1. Connect to the device

    2. Session takes a long time to complete

    3. Bash error for incompatible session

The Junos Space appliance accepts SCP connections which are incompatible with the default shell used by WinSCP.

The default SCP Options within WinSCP cause the connection to fail, even if the correct username and password parameters are entered.

The SSH TCP port needs to be open towards the Junos Space appliance.  This is port 22.
  • Is SFTP an Option to securely transfer files ?

    Most application notes indicate using SCP (Secure Channel Protocol) towards the Junos Space appliance to transfer the file, however, the default option in WinSCP is for SFTP (SSH File Transfer Protocol or Secure File Transfer Protocol).

    SFTP is an extension of the existing SSH v2 protocol, and hence uses the same port (22) to transfer files and perform other operations on remote file systems utilising the Secure Shell authentication and security.

    This setting is seen in the middle of the below graphic.

    WinSCP Default settings

    Junos Space accepts SFTP connections, and this option is possible through the WinSCP program.
  • Can I use SCP through WinSCP to securely transfer files?

    The default Shell within WinSCP when SCP is selected is 'Default', as described in the Problem section above.
    These settings need to be modified on the Win SCP client.

    In order to successfully connect using SCP, this Shell must be changed to "/bin/bash".  This option is available after selecting the Advanced Options tick box, and then in the left hand menu Environment -> SCP/Shell.

    This setting will allow the connection when the File Protocol is selected as "SCP", as in the below.



Either SFTP or SCP (with the Shell selected as /bin/bash) will connect WinSCP to Junos Space.
Modification History:
2019-07-22: Expanded visibility of the KB to the public audience.
Related Links: