Topic "Knocking FTP port, Port did not open"

Author Message
cyanceenu
[View user's profile]

Joined: 2015-07-29
Posts: 1
Location: Malaysia
Hi

I'm executing the winscp.com with script file from the Windows Scheduler, the job is scheduled for every 10 mins. Sometimes the connection is successful and sometime not successful, I'm herewith attaching the log file can some one look into the issue.

. 2015-07-29 10:40:01.947 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-07-29 10:40:01.947 SFTP Bugs: A,A
. 2015-07-29 10:40:01.947 SFTP Server: default
. 2015-07-29 10:40:01.947 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-07-29 10:40:01.947 Cache directory changes: Yes, Permanent: Yes
. 2015-07-29 10:40:01.947 DST mode: 1
. 2015-07-29 10:40:01.947 --------------------------------------------------------------------------
. 2015-07-29 10:40:01.947 Looking up host "211.25.235.209"
. 2015-07-29 10:40:01.947 Connecting to 211.25.235.209 port 22
. 2015-07-29 10:40:22.968 Failed to connect to 211.25.235.209: Network error: Connection timed out
. 2015-07-29 10:40:22.968 Knocking FTP port.
. 2015-07-29 10:40:24.968 FTP port did not open.
. 2015-07-29 10:50:03.832 -----------------------

Thanks & Regards
Srinivas
testlog.txt (11.75 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Did you check server-side log if it received an incoming connection?
vlad.bel

Guest


I experience this problem too. In my session settings there port is 21 but when the command line is used, we can see in the log that port 22 is submitted. Why is that?
vlad.bel

Guest


Normally, in GUI, connection works both in FTP and SFTP sessions. When I use same session name in command line, I see exactly same log as in this topic above.
Is there the way to specify port # in command line?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
vlad.bel wrote:
Normally, in GUI, connection works both in FTP and SFTP sessions. When I use same session name in command line, I see exactly same log as in this topic above.
Is there the way to specify port # in command line?

If you want to use the FTP protocol, use ftp:// protocol prefix in the session URL:
http://winscp.net/eng/docs/session_url

You can specify the port in the URL explicitly too. But it's not necessary, if you use the standard port for the protocol (i.e. 21 for FTP).
vlad.bel

Guest


prikryl wrote:
vlad.bel wrote:
Normally, in GUI, connection works both in FTP and SFTP sessions. When I use same session name in command line, I see exactly same log as in this topic above.
Is there the way to specify port # in command line?

If you want to use the FTP protocol, use ftp:// protocol prefix in the session URL:
http://winscp.net/eng/docs/session_url

You can specify the port in the URL explicitly too. But it's not necessary, if you use the standard port for the protocol (i.e. 21 for FTP).


I have it done for ftp in command line but i need it to work with sftp. My sftp connection works fine in WinSCP GUI not in command line. I have leraned examples and collected command line which does not work (in cmd.exe):
>"C:\Program Files\WinSCP\WinSCP.com" /command "open sftp://username:password@mysite.com:3879/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"" "put C:\Cache\Qty-UL.php /public_html/vb-scripts/" "exit"

The story is:

Searching for host...
Connecting to host...
Authenticating...
Host key does not match configured key "ssh-rsa"!
Host key fingerprint is ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Authentication failed.
Unknown command '2048'.
Unknown command 'xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx'.
No session.

So it does not accept white spaces in host key. I do not know what to do about it. W/o host key specified, program wanted to get "Yes" in order to finish authentication as if I could do it.
Please advise. Thanks for your time.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
"C:\Program Files\WinSCP\WinSCP.com" /command "open sftp://username:password@mysite.com:3879/ -hostkey=""ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" "put C:\Cache\Qty-UL.php /public_html/vb-scripts/" "exit"

See http://winscp.net/eng/docs/commandline#syntax
vlad.bel

Guest


Thank you, Martin.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License