PCNSE
NSE
StrongSwan
$connection = ssh2_connect(' 10.10.1.253' , 22); // <- no error ssh2_auth_password($connection, ' admin' , ' <foobar>' ); // <- no error ssh2_scp_recv($connection, ' sys_config' , ' sys_config' ); // <- PHP Warning: ssh2_scp_recv(): Unable to receive remote file in [...]That' s a very simple example that works with our linux-servers, but not with the fgt. It is also possible to open a stream (interactive session) on this connection to send and receive commands, but not a simple scp.
$connection = ssh2_connect(' 10.10.1.253' , 22); // <- no error ssh2_auth_password($connection, ' admin' , ' <foobar>' ); // <- no error ssh2_scp_recv($connection, ' sys_config' , ' sys_config' ); // <- PHP Warning: ssh2_scp_recv(): Unable to receive remote file in [...]Sow when you are on the host trying to grab the file & execute the following; scp admin@10.10.1.253:sys_config ./ that works 100% of the time? Maybe you need to escape the " -" in the file name ?
PCNSE
NSE
StrongSwan
NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C
login as: admin Authenticating with public key " tc" FG-GW # execute cli check-template-status the scp script template is stopped.Whether I run the scp script or not.
diag deb ena diag deb cli 7to see a bit more on the command line. I' ve tried doing this for a while now without success. Using Secure Shell ssh v3.2.9 and pscp from the putty installation. Command just freezes. Login via ssh shell is no problem, using the imported public key.
NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1740 | |
1108 | |
752 | |
447 | |
240 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.