开发者

Writing a batch file that enters a password when prompted

开发者 https://www.devze.com 2023-03-28 20:58 出处:网络
I\'m writing a batch file that runs the below command winscp sftp://username:password@host.com:22 /privatekey=pgp530.ppk

I'm writing a batch file that runs the below command

winscp sftp://username:password@host.com:22 /privatekey=pgp530.ppk

The output is as follows

Searching for hos开发者_如何学Pythont... Connecting to host... Authenticating... Using username "username". Authenticating with public key "imported-openssh-key". Passphrase for key 'imported-openssh-key':

Is there any way to have the batch file enter the passphrase when prompted? Thanks!


Why not just create a private key without a password, or remove the password from the private key?

It'll be roughly as secure as passing in a plain-text password to the key.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号