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: Automatically answer SSH question while connecting

quigel wrote:

Thank you Martin for your quick reply. The issue was I am using AFS and the connection may go to any server available and hence different keys for different servers. I got this resolved by entering the specific server in the stored session.

OK. The next version of WinSCP will allow storing of multiple keys for single host.
quigel

Re: Automatically answer SSH question while connecting

martin wrote:

quigel wrote:

I have a batch script which runs fine a few times (to copy files from NT to UNIX)then it starts giving the following error. What can I do? It again runs properly once I log in and run it manually.

If the fingerprint really changes (does it?), then it looks like someone is reinstalling the SSH server all the time. Or of course some may be spoofing your server.


Thank you Martin for your quick reply. The issue was I am using AFS and the connection may go to any server available and hence different keys for different servers. I got this resolved by entering the specific server in the stored session.
martin

Re: Automatically answer SSH question while connecting

quigel wrote:

I have a batch script which runs fine a few times (to copy files from NT to UNIX)then it starts giving the following error. What can I do? It again runs properly once I log in and run it manually.

If the fingerprint really changes (does it?), then it looks like someone is reinstalling the SSH server all the time. Or of course some may be spoofing your server.
quigel

Re: Automatically answer SSH question while connecting

martin wrote:

Just do not do that. It breaks purpose of SSH. The only safe way is to pre-accept the host key in WinSCP configuration.


I have a batch script which runs fine a few times (to copy files from NT to UNIX)then it starts giving the following error. What can I do? It again runs properly once I log in and run it manually.

Thanks.

. 2008-01-17 17:20:02.439 The server's host key does not match the one WinSCP has is cache. This means that either the server administrator has changed the host key, or you have actually connected to another computer pretending to be the server.
. 2008-01-17 17:20:02.439
. 2008-01-17 17:20:02.439 The new rsa2 key fingerprint is:
. 2008-01-17 17:20:02.439 ssh-rsa 1024 fc:3d:12:e0:44:f3:fc:b1:b8:4a:c7
. 2008-01-17 17:20:02.439
. 2008-01-17 17:20:02.439 If you were expecting this change and trust the new key, press Yes to update cache and continue connecting. If you want to carry on connecting but without updating the cache, press No. If you want to abandon the connection completely, press Cancel. Pressing Cancel is the ONLY guaranteed safe choice.
. 2008-01-17 17:20:02.439 ()
. 2008-01-17 17:20:02.439 Attempt to close connection due to fatal exception:
* 2008-01-17 17:20:02.439 Host key wasn't verified!
. 2008-01-17 17:20:02.439 Closing connection.
martin

Re: Automatically answer SSH question while connecting

Just do not do that. It breaks purpose of SSH. The only safe way is to pre-accept the host key in WinSCP configuration.
huangpa

Automatically answer SSH question while connecting

While connection, the server asks:
If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.Continue connecting and add host key to the cache?(Y)es, (N)o, (C)ancel: No
How to answer this quesiton automatically in batch with user intervenience.

Regards,

Patrick