The server ' s host key is not a cached in the registry. You have no guarantee that the server ...

Source: Internet
Author: User
Tags pscp

Using the Pscp.exe in Putty, Windows can be scripted to upload files to Linux, but Pscp.exe first run must manually enter the confirmation information, this article mainly resolves the first run of human interaction, completely realize silent operation. This program can be used in many Task scheduler

error message: The server ' s host key is not a cached in the registry. You have no guarantee, the server is the computer your think it is.

Solution:

1. Create a new text file, enter Y and then wrap

For example: Confirm.txt:

Y< blank line >

2. Enter Y as a file redirection at the end of the Pscp.exe command, as shown in the following example:

< Confirm.txt

Description, redirect the input ' < ' to redirect text content as input to the PSCP command, and automatically answer prompts when running PSCP

3 Below is an example of my own, for reference only

:: Set Run time set datevar=%date: ~0,4%%date: ~5,2%%date: ~8,2%::  Start running PSCP and redirect the input C:\vminfo\PSCP as a file . Exe-q-PW X33+esac c:\vminfo\test\runningtask* [email protected]:/vminfo/< C:\VMInfo\test\confirm. Bat :: Print Log Echo "##### #EndTime--%datevar%:%time%########" >> c:\VMInfo\test\Running1.log

Reference:

Http://www.sqlservercentral.com/Forums/Topic281954-9-3.aspx

Batch processing (BAT) obtains textual content using set p and redirect input branches

The server ' s host key is not cached in the registry. You have no guarantee the server ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.