This article described how to enable SCP service on a Juniper Networks switch in order to establish a file transfer session with a remote end host.
In this scenario, you would like to start WindSCP session on a Laptop/PC which is able to reach the Juniper Networks switch with ping, but you may be unable to connect WinSCP session successfully as the switch seems to reject it.
You can enable SSH service on Juniper Networks switches sinceThe SSH protocol uses strong authentication and encryption for remote access across a network that is not secure. SSH provides remote login, remote program execution, file copy, and other functions. SSH succeeds Telnet and is the recommended method for remote access. SSH encrypts all traffic, including passwords, to effectively eliminate eavesdropping, connection hijacking, and other attacks. The SSH utility includes Secure Copy Protocol (SCP), a file-transfer program that uses SSH and is the recommended method for secure file exchange.. Proceed to configure SSH with the following command, and commit the change:
[edit] user@switch# set system services ssh root-login allow
Note that we are allowing root-login as it may not connect with other usernames/passwords. If that is the case, you should include "root-login allow" at the end. In this scenario, you must use "root" as username and the configured password on the WinSCP app on the Laptop/PC.
If you do not wish to keep root-login allow for long, you may remove that stanza after completing the desired file transfer.Note: By default, SSH root login behavior has been allowed globally prior to the version 18. However after 18 version, SSH root login has been changed to disallow by default.
06/16/2023 - KB created11/03/2023 - Added a note.