I have a lot of linux driven devices which I need to configure and setup. All devices have same root pass. Now I need to copy files on those devices.

One way is using pscp.exe, but this utility requires interaction, prompting The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is. message.

Actually, I don't need secure copy, I just need to copy files in batch mode for any given device without user interaction. How can I do it?

有帮助吗?

解决方案

If you just connect to the server once with putty and accept the server's key, you'll be fine, and pscp won't nag you afterwards.

Other options would be a writable smb share ( or nfs if you fancy that) , an ftp server, ...

其他提示

With help of plink.exe it is possible with simple:

echo y | "PLINK.EXE"  -pw pass user@%ip% echo foobar > nul 2>&1 || goto myError

Now I can use pscp without worry that it will request undesired interaction.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top