Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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: Timeout

Mike W wrote:

I am using Winscp in a script and if it fails with private key it waits for a psssword input and never time out. THis caused all the rest of the process to stop. Being able to set a timeout in Winscp such that if no password is entered / no authentication within x seconds then it abandons connection would be a very welcome feature to make this a little more robust.

This will be added in the next release.
Mike W

Timeout

I am using Winscp in a script and if it fails with private key it waits for a psssword input and never time out. THis caused all the rest of the process to stop. Being able to set a timeout in Winscp such that if no password is entered / no authentication within x seconds then it abandons connection would be a very welcome feature to make this a little more robust.
martin

Re: How do I use a private key with an INI file

dmalesd wrote:

Can you give me any time frame for when it can be incorporated in a release?

I have no fixed plans for a next release, yet. Sorry :-(
dmalesd

Re: How do I use a private key with an INI file

martin wrote:

dmalesd wrote:

WinSCP does not allow that.

Thats a shame. Has anyone else asked for this feature?

You are the first. I'll consider that.


Can you give me any time frame for when it can be incorporated in a release?
Thanks very much. Apart from this little problem WinSCP is working absolutely fine. Thanks.
martin

Re: How do I use a private key with an INI file

dmalesd wrote:

WinSCP does not allow that.

Thats a shame. Has anyone else asked for this feature?

You are the first. I'll consider that.
dmalesd

Re: How do I use a private key with an INI file

martin wrote:

dmalesd wrote:

The problem is WinSCP.com sometimes does not successfully complete key authentication and then waits for input of a password.

What does this happen?
The problem occurs when authenticating. The WinSCP log file says access denied and then asks for a password. This leaves the WinSCP process running on my PC which I don't want to happen.
The log file also shows the same connection happening 50 seconds later (different username but same key) and this works ok.
I can send you the snippet from my log file if you wish?

The problem occurs 10-20 times over a 12 hour period where WinSCP is executed every minute by a scheduled task.

If this happens I wish to timeout the session after say 10 seconds.

WinSCP does not allow that.

Thats a shame. Has anyone else asked for this feature?

Thanks very much for the reply.
martin

Re: How do I use a private key with an INI file

dmalesd wrote:

The problem is WinSCP.com sometimes does not successfully complete key authentication and then waits for input of a password.

What does this happen?
If this happens I wish to timeout the session after say 10 seconds.

WinSCP does not allow that.
dmalesd

How do I use a private key with an INI file

I have since found the solution to the authentication problem. I changed the INI file to :
[Sessions\USDtoAMW]
Hostname=xxx.xx.xx.xx
Username=amw-out
PublickeyFile=D:%5CAMW%5CPollUSD%5Cxxx.ppk
PingType=0
RemoteDirectory=/AMW/Output
TimeOut=30

and said yes to the prompt for adding host key to the cache. After this a new heading [SshHostKeys] appeared in the INI file with the relevant information.
However I don't think this resolves my original problem. Can someone confirm the following:
1) If the timeout relates to the detection of no activity from the remote server and hence ends the session....
2) is there an INI setting relating to detection of activity in the WinSCP client itself. Once the timeout has been reached then the session will end. The problem is WinSCP.com sometimes does not successfully complete key authentication and then waits for input of a password. If this happens I wish to timeout the session after say 10 seconds.
Cheers
David
dmalesd

How do I use a private key with an INI file

Hi,
I currently run a script using WinSCP.com. The current command line call is
"D:\Program Files\WinSCP3\WinSCP3.com" /privatekey="D:\Program Files\WinSCP3\xxx.ppk" /script="D:\AMW\PollUSD\USDtoAMWScript.txt"

and this works ok. However now I wish to timeout the session after a certain period of time.

After reading other posts about setting a session timeout I gather I have to add a timeout to an INI file and reference the /ini in my command line call to create a session.
After a number of attempts I cannot seem to connect to the server whereby WinSCP uses the key file in the authentication process. It finds the server and (as I have batch turned off in my script file) then I am prompted to verify the "The server's rsa2 key fingerprint". When I reply yes I am still prompted with a password request, when there is no password specified for the username I am using.

My INI session configuration is:
[Sessions\USDtoAMW]
Hostname=xxx.xx.xx.xx
Username=amw-out
PrivatekeyFile="D:\Program Files\WinSCP3\xxx.ppk"
PingType=0
RemoteDirectory=/AMW/Output
TimeOut=30

Any thoughts would be gratefully appreciated. Thanks
David