Knocking FTP port, Port did not open

Advertisement

cyanceenu
Joined:
Posts:
1
Location:
Malaysia

Knocking FTP port, Port did not open

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

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

Re: Knocking FTP port, Port did not open

Did you check server-side log if it received an incoming connection?

Reply with quote

vlad.bel
Guest

Same problem

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?

Reply with quote

vlad.bel
Guest

Re: Same problem

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

Re: Same problem

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:
https://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).

Reply with quote

Advertisement

vlad.bel
Guest

Re: Same problem

martin 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:
https://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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

Re: Same problem

"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 https://winscp.net/eng/docs/commandline#syntax

Reply with quote

Advertisement

You can post new topics in this forum