Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Network error: Connection timed out - only when calling from a different machine

Ashwin wrote:

How can one change these windows policies?

I do not know. That's Windows administration question that we cannot answer here. Consider asking on https://superuser.com/ or https://serverfault.com/
Ashwin

Re: Network error: Connection timed out - only when calling from a different machine

martin wrote:

You probably have a Windows local policy in place, that prevents an application, run from a network location, to access an Internet/network.


How can one change these windows policies?
martin

Re: Network error: Connection timed out - only when calling from a different machine

You probably have a Windows local policy in place, that prevents an application, run from a network location, to access an Internet/network.
mcharles65

Network error: Connection timed out - only when calling from a different machine

Hello,

I'm using WinSCP version 5.8.4 RC (Build 6736). WinSCP is installed on SERVERXYZ.
I'm using the sftp protocol and am calling a XrayTest.bat file to do my file transfer. If I call XrayTest.bat from a command prompt of SERVERXYZ via UNC path, ex: C:\> \\SERVERXYZ\share\folder\XrayTest.bat then the batch file and script runs successfully and transfers the files to the remote location as expected.

However, when issuing the same UNC call from a different machine: CLIENTPC C:\> \\SERVERXYZ\share\folder\XrayTest.bat, the .bat file executes and runs the script, but WinSCP fails with a timeout when trying to connect to the remote server. Here is the log excerpt:
. 2016-08-11 14:21:26.385 --------------------------------------------------------------------------
. 2016-08-11 14:21:26.397 Looking up host "remote.server.com" for SSH connection
. 2016-08-11 14:21:26.430 Connecting to xxx.xx.xxx.xx port 22
. 2016-08-11 14:21:47.413 Failed to connect to xxx.xx.xxx.xx: Network error: Connection timed out
. 2016-08-11 14:21:47.544 Knocking FTP port.
. 2016-08-11 14:21:47.667 FTP port opened, will suggest using FTP protocol.

Here are the commands in the XrayTest.bat file:
rem *** create parameter variables for WinSCP call
set "imagefile=\\SERVERXYZ\share\folder\%imagefile%"
set "depositfile=\\SERVERXYZ\share\folder\%depositfile%"

rem *** Call WinSCP to transfer the files, writing log file.
"\\SERVERXYZ\share\folder\WinSCP\winscp.com" /log="\\SERVERXYZ\share\folder\WinSCP\winscp.log" /loglevel=1 /script="\\SERVERXYZ\share\folder\script.txt" /parameter %imagefile% %depositfile% >> "\\SERVERXYZ\share\folder\FTPLog.txt"

Here is the script.txt file:
option batch abort
option confirm off
option transfer binary
open sftp://user:pw@remote.server.com/ -hostkey="ssh-rsa 2048 cb:e9:b9:a5:a3:b9:e6:16:c9:18:2a:dc:a2:8a:b4:ba"
put -nopermissions -nopreservetime %1%
put -nopermissions -nopreservetime %2%
exit

Any help is appreciated on why this works when called on the local machine, but fails when called from a remote machine with the UNC path. Let me know if I missed supplying a pertinent piece of information

Thanks,
Mark