如何通过密码scp怎么办? [英] How to pass password to scp?

查看:205
本文介绍了如何通过密码scp怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道是不推荐它,但它是在所有可能通过用户的密码给scp?

I know it is not recommended, but is it at all possible to pass the user's password to scp?

我想通过scp复制文件作为批处理作业的一部分,并接收服务器呢,当然需要一个密码和,不,我不能轻易改变,要重点为基础的身份验证。

I'd like to copy a file via scp as part of a batch job and the receiving server does, of course, need a password and, no, I cannot easily change that to key-based authentication.

推荐答案

您可以与像工具脚本指望它(有方便绑定太像 Pexpect的为Python)。

You can script it with a tool like expect (there are handy bindings too, like Pexpect for Python).

这篇关于如何通过密码scp怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆